Пример #1
0
def test_scl_name_screwed_up(capsys, package):
    '''
    SCL check on SCL package that differs it's name from scl tree folder
    '''
    SCLCheck.check.check(getTestedPackage(package))
    out, err = capsys.readouterr()
    assert 'scl-name-screwed-up' in out
Пример #2
0
def test_unexpanded_macros(capsys, package):
    TagsCheck.check.check(getTestedPackage(os.path.join('binary', package)))
    out, err = capsys.readouterr()
    assert 'unexpanded-macro Recommends' in out
    assert 'unexpanded-macro Provides' in out
    assert 'unexpanded-macro Conflicts' in out
    assert 'unexpanded-macro Suggests' in out
    assert 'unexpanded-macro Obsoletes' in out
    assert 'unexpanded-macro Enhances' in out
Пример #3
0
def test_scl_binary_rpm(capsys, package):
    '''
    A bunch of testing binary RPM packages using SCL
    Assuming they are all OK and except silent output
    While adding more checks, this might change
    '''
    SCLCheck.check.check(getTestedPackage(os.path.join('binary', package)))
    out, err = capsys.readouterr()
    assert not out
Пример #4
0
def test_forbidden_c_calls(capsys, package):
    BinariesCheck.check.check(getTestedPackage(os.path.join('binary',
                                                            package)))
    out, err = capsys.readouterr()
    assert 'crypto-policy-non-compliance' in out
Пример #5
0
def test_devel_files(capsys, package):
    FilesCheck.check.check(getTestedPackage(os.path.join("binary", package)))
    out, err = capsys.readouterr()
    assert "devel-file-in-non-devel-package" not in out
Пример #6
0
def test_python_bytecode_magic(capsys, package):
    FilesCheck.check.check(getTestedPackage(os.path.join("binary", package)))
    out, err = capsys.readouterr()
    assert "python-bytecode-wrong-magic-value" not in out
Пример #7
0
def test_pam_check(capsys, package):
    PamCheck.check.check(getTestedPackage(os.path.join('binary', package)))
    out, err = capsys.readouterr()
    assert 'PamCheck.i586: E: use-old-pam-stack' in out
    assert '/etc/pam.d/PamCheck (line 1)' in out
Пример #8
0
def test_scl_macros_outside_of_build(capsys, package):
    '''SCL check on SCL package that has files in forbidden folders'''
    SCLCheck.check.check(getTestedPackage(package))
    out, err = capsys.readouterr()
    assert 'scl-rpm-macros-outside-of-build' in out
Пример #9
0
def test_scl_forbidden_folders(capsys, package):
    '''SCL check on SCL package that has files in forbidden folders'''
    SCLCheck.check.check(getTestedPackage(package))
    out, err = capsys.readouterr()
    assert 'file-outside-of-scl-tree' in out
Пример #10
0
def test_raises_parse_error(capsys, package):
    MenuXDGCheck.check.check(getTestedPackage(os.path.join('binary', package)))
    out, err = capsys.readouterr()
    assert 'contains parsing error' in out
    assert ' invalid-desktopfile ' in out
Пример #11
0
def test_inconsistent_file_extension(capsys, package):
    SourceCheck.check.check(getTestedPackage(os.path.join('source', package)))
    out, err = capsys.readouterr()
    assert 'inconsistent-file-extension' in out
Пример #12
0
def test_check_include(capsys):
    SpecCheck.check.check_source(getTestedPackage('source/CheckInclude'))
    out, err = capsys.readouterr()
    assert 'E: specfile-error error: query of specfile' not in out
Пример #13
0
def test_distribution_tags(capsys, package):
    DistributionCheck.check.check(
        getTestedPackage(os.path.join('binary', package)))
    out, err = capsys.readouterr()
    assert 'invalid-distribution' not in out
    assert 'invalid-vendor' not in out