WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Use *args inside FAIL and SKIP so that it is possible to

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Use *args inside FAIL and SKIP so that it is possible to call these functions
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Mar 2006 16:02:08 +0000
Delivery-date: Thu, 23 Mar 2006 16:03:45 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID f3943890794ac66b72bbf1ca634120d23999a376
# Parent  40e3df4cffe44b69131b3372d992238c06f6956c
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@xxxxxxxxxxxxx>

diff -r 40e3df4cffe4 -r f3943890794a tools/xm-test/lib/XmTestLib/Test.py
--- a/tools/xm-test/lib/XmTestLib/Test.py       Thu Mar 23 13:32:15 2006
+++ b/tools/xm-test/lib/XmTestLib/Test.py       Thu Mar 23 13:34:35 2006
@@ -131,12 +131,12 @@
         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):

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Use *args inside FAIL and SKIP so that it is possible to call these functions, Xen patchbot -unstable <=