예제 #1
0
    def test_lintian(self):
        lintian_analysis = lintian(self.filepath, self.firehose_results)
        content = lintian_analysis[1]
        self.assertTrue("no-symbols-control-file" in content)

        # It think it is safe to say that the string is not 4 chars long
        self.assertTrue(len(content) > 4)
예제 #2
0
    def test_lintian(self):
        lintian_analysis = lintian(self.filepath, self.firehose_results)
        content = lintian_analysis[1]
        self.assertTrue("no-symbols-control-file" in content)

        # It think it is safe to say that the string is not 4 chars long
        self.assertTrue(len(content) > 4)
예제 #3
0
 def test_lintian_wrappers(self):
     lintian_analysis = lintian(self.filepath, self.firehose_results)
     issues = parse_lintian(lintian_analysis[1].splitlines(), self.filepath)
     i = 0
     for issue in issues:
         if issue.testid == "no-symbols-control-file":
             found = issue
         i += 1
     self.assertEquals(found.testid, "no-symbols-control-file")
     self.assertEquals(found.location.file.givenpath,
             "tests/resources/libjsoncpp0_0.6.0~rc2-3.1_amd64.deb")
     self.assertIsNone(found.location.point)
     self.assertEquals(found.severity, "info")
     self.assertIsNone(found.notes)
     self.assertIsNone(found.customfields)
     self.assertTrue("libjsoncpp0: no-symbols-control-file usr/lib/libjsoncpp.so.0.6.0"
             in found.message.text)
     self.assertTrue(i > 1)
예제 #4
0
 def test_lintian_wrappers(self):
     lintian_analysis = lintian(self.filepath, self.firehose_results)
     issues = parse_lintian(lintian_analysis[1].splitlines(), self.filepath)
     i = 0
     for issue in issues:
         if issue.testid == "no-symbols-control-file":
             found = issue
         i += 1
     self.assertEquals(found.testid, "no-symbols-control-file")
     self.assertEquals(
         found.location.file.givenpath,
         "tests/resources/libjsoncpp0_0.6.0~rc2-3.1_amd64.deb")
     self.assertIsNone(found.location.point)
     self.assertEquals(found.severity, "info")
     self.assertIsNone(found.notes)
     self.assertIsNone(found.customfields)
     self.assertTrue(
         "libjsoncpp0: no-symbols-control-file usr/lib/libjsoncpp.so.0.6.0"
         in found.message.text)
     self.assertTrue(i > 1)
예제 #5
0
def test_lintian_common():
    firehorse_results = Analysis(metadata=Metadata(
        generator=Generator(name='lintian'), sut=None, file_=None, stats=None),
                                 results=[])

    return lintian(filepath, firehorse_results)
예제 #6
0
def run(target, package, job, firehose):
    return lintian(target, firehose, lintian_binary='lintian')
예제 #7
0
def run(dfiles, package, job, firehose):
    if not isinstance(dfiles, list):
        dfiles = [dfiles]
    return lintian(dfiles, firehose, lintian_binary='lintian4py')