Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/pactest/pmtest.py
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-02-26 08:19:02 +0000
committerAaron Griffin <aaron@archlinux.org>2007-02-26 08:19:02 +0000
commit25223d679078dc756bbd8aea46f713259a4365ee (patch)
treef9775e7ac9e2f259d8dc4b2f86434264498276ba /pactest/pmtest.py
parent4a75e42f124929d5e4d0d2e3f35869747227ba5f (diff)
* 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)
Diffstat (limited to 'pactest/pmtest.py')
-rwxr-xr-xpactest/pmtest.py9
1 files changed, 6 insertions, 3 deletions
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 @@ class pmtest:
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 @@ class pmtest:
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