From 14443220f45c4d01fe76eeb40edb589137188571 Mon Sep 17 00:00:00 2001 From: Johnny Hughes Date: May 23 2016 20:52:51 +0000 Subject: Merge pull request #18 from bstinsonmhk/fixup-failure-checking Fixup PASS/FAIL reporting and just check all repos that are currently enabled --- diff --git a/tests/z_rpminfo/check-rpminfo.py b/tests/z_rpminfo/check-rpminfo.py index 7c1dfa2..34fc96c 100644 --- a/tests/z_rpminfo/check-rpminfo.py +++ b/tests/z_rpminfo/check-rpminfo.py @@ -27,12 +27,6 @@ def skip(skipstring): log('Running check-rpminfo.py - Check rpminfo Attributes') -if str(os.getenv('PRE_UPDATES')) == '1': - checkrepos = ['updates'] -else: - log('Not running in preupdates, checking all repos') - checkrepos = ['extras', 'base', 'updates', 'centosplus'] - # Set the required attributes and their values here. You may use shell-style # globs in the value if necessary. required_attrs = { @@ -60,11 +54,8 @@ with open(os.path.join(sys.path[0],'special_overrides.txt'),'r') as thefile: yb = yum.YumBase() yb.conf.cache = 0 -yb.repos.disableRepo('*') - -for repo in checkrepos: - yb.repos.enableRepo(repo) yb.repos.doSetup() +log("Checking repos: {0}".format(', '.join([r.name for r in yb.repos.listEnabled()]))) sack = yb.pkgSack diff --git a/tests/z_rpminfo/check-rpminfo.sh b/tests/z_rpminfo/check-rpminfo.sh index 78b55c4..16891fe 100755 --- a/tests/z_rpminfo/check-rpminfo.sh +++ b/tests/z_rpminfo/check-rpminfo.sh @@ -5,6 +5,7 @@ if [[ $centos_ver != 5 ]] then python "$(dirname "$(readlink -f "$0")")/check-rpminfo.py" + t_CheckExitStatus $? else echo "Skipped on CentOS 5" fi