aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>2006-03-23 14:34:35 +0100
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>2006-03-23 14:34:35 +0100
commit98009c2ad02f691d9418095cf3e7b65bffdd588b (patch)
tree2af68bedc48562171c5cbae37c17ce35199ca438
parent1bac3b49cdd459df9bd93f2997226ad535caaae2 (diff)
downloadxen-98009c2ad02f691d9418095cf3e7b65bffdd588b.tar.gz
xen-98009c2ad02f691d9418095cf3e7b65bffdd588b.tar.bz2
xen-98009c2ad02f691d9418095cf3e7b65bffdd588b.zip
Use *args inside FAIL and SKIP so that it is possible to call these functions
with multiple arguments, printf style. This is already being done in some cases (causing an exception of course). Signed-off-by: Ewan Mellor <ewan@xensource.com>
-rw-r--r--tools/xm-test/lib/XmTestLib/Test.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/xm-test/lib/XmTestLib/Test.py b/tools/xm-test/lib/XmTestLib/Test.py
index 32d1574eae..ee49ccd358 100644
--- a/tools/xm-test/lib/XmTestLib/Test.py
+++ b/tools/xm-test/lib/XmTestLib/Test.py
@@ -131,12 +131,12 @@ def becomeNonRoot():
if os.geteuid() == 0:
FAIL("Could not become a non-root user")
-def FAIL(reason):
- print "\nREASON: %s" % reason
+def FAIL(format, *args):
+ print "\nREASON:", (format % args)
sys.exit(TEST_FAIL)
-def SKIP(reason):
- print "\nREASON: %s" % reason
+def SKIP(format, *args):
+ print "\nREASON:", (format % args)
sys.exit(TEST_SKIP)
def saveLog(logText, filename=None):