From 25223d679078dc756bbd8aea46f713259a4365ee Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Mon, 26 Feb 2007 08:19:02 +0000 Subject: * corrected (IMO) --debug usage with pactest. --debug is now passed straight through to pacman, whereas --verbose affects the pactest output - this cleans up the standard test output significantly * sorted tests a bit better, sectioning off failed tests AFTER successful tests, to make it easier to see what failed at a glance * added a 'testname' member to pmtest, which strips path info (cleaner output) --- pactest/pmtest.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'pactest/pmtest.py') diff --git a/pactest/pmtest.py b/pactest/pmtest.py index 629a5754..0b21ba40 100755 --- a/pactest/pmtest.py +++ b/pactest/pmtest.py @@ -19,6 +19,7 @@ import os +import os.path import shutil import time @@ -35,11 +36,13 @@ class pmtest: def __init__(self, name, root): self.name = name + self.testname = os.path.basename(name).replace('.py', '') self.root = root def __str__(self): return "name = %s\n" \ - "root = %s" % (self.name, self.root) + "testname = %s\n" \ + "root = %s" % (self.name, self.testname, self.root) def addpkg2db(self, treename, pkg): """ @@ -197,7 +200,7 @@ def run(self, pacman): cmd.append("%s" % self.args) if not pacman["gdb"] and not pacman["valgrind"] and not pacman["nolog"]: cmd.append(">%s 2>&1" % os.path.join(self.root, LOGFILE)) - dbg(" ".join(cmd)) + vprint("\trunning: %s" % " ".join(cmd)) # Change to the tmp dir before running pacman, so that local package # archives are made available more easily. @@ -214,7 +217,7 @@ def run(self, pacman): self.retcode = 0 else: self.retcode /= 256 - dbg("retcode = %s" % self.retcode) + vprint("\tretcode = %s" % self.retcode) os.chdir(curdir) # Check if pacman failed because of bad permissions -- cgit v1.2.3-54-g00ecf