Beispiel #1
0
def lintian(packages, analysis, lintian_binary='lintian'):
    log = ""
    failed = False

    for package in packages:
        out, err, ret = run_command([lintian_binary, "-IE", "--pedantic",
                                     "--show-overrides", package])
        for issue in parse_lintian(out.splitlines(), package):
            analysis.results.append(issue)
            if issue.severity in ['warning', 'error']:
                failed = True
        log += out

    return (analysis, log, failed)
Beispiel #2
0
def test_lintian():
    for string, tid in TESTS:
        issue = next(parse_lintian([string], 'what'))
        assert issue.severity == tid
Beispiel #3
0
def test_lintian():
    for string, tid in TESTS:
        issue = next(parse_lintian([string], 'what'))
        assert issue.severity == tid