summaryrefslogtreecommitdiffstats
path: root/pactest
diff options
context:
space:
mode:
Diffstat (limited to 'pactest')
-rwxr-xr-xpactest/pmrule.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/pactest/pmrule.py b/pactest/pmrule.py
index f4e35443..ea3ad333 100755
--- a/pactest/pmrule.py
+++ b/pactest/pmrule.py
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
+import os
from util import *
from stat import *
@@ -52,7 +52,11 @@ class pmrule:
if retcode != int(key):
success = 0
elif case == "OUTPUT":
- if not grep(os.path.join(root, LOGFILE), key):
+ logfile = os.path.join(root, LOGFILE)
+ if not os.access(logfile, os.F_OK):
+ print "LOGFILE not found, cannot validate 'OUTPUT' rule"
+ success = 0
+ elif not grep(os.path.join(root, LOGFILE), key):
success = 0
else:
print "PACMAN rule '%s' not found" % case