예제 #1
0
파일: lintian.py 프로젝트: paultag/ethel
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)
예제 #2
0
def test_lintian():
    for string, tid in TESTS:
        issue = next(parse_lintian([string], 'what'))
        assert issue.severity == tid
예제 #3
0
def test_lintian():
    for string, tid in TESTS:
        issue = next(parse_lintian([string], 'what'))
        assert issue.severity == tid