wscript
changeset 3617 1fec65ceb523
parent 3579 9e5eaef3e082
child 3618 da5482f27f7e
--- a/wscript	Thu Sep 04 10:08:02 2008 -0700
+++ b/wscript	Thu Sep 04 10:34:42 2008 -0700
@@ -425,13 +425,16 @@
     if env['NSC_ENABLED'] == 'yes':
         nsc_build(bld)
 
-def get_command_template():
+def get_command_template(arguments):
     if Params.g_options.valgrind:
         if Params.g_options.command_template:
             Params.fatal("Options --command-template and --valgrind are conflicting")
-        return "valgrind --leak-check=full %s"
+        cmd = "valgrind --leak-check=full %s"
     else:
-        return (Params.g_options.command_template or '%s')
+        cmd = Params.g_options.command_template or '%s'
+    for arg in arguments:
+        cmd = cmd + " " + arg
+    return cmd
 
 
 def shutdown():
@@ -818,7 +821,7 @@
         env = Params.g_build.env_of_name('default')
         self.diff = env['DIFF']
 
-    def run_test(self, verbose, generate, refDirName, testName):
+    def run_test(self, verbose, generate, refDirName, testName, *arguments):
         refTestDirName = os.path.join(refDirName, (testName + ".ref"))
 
         if not os.path.exists(refDirName):
@@ -831,7 +834,10 @@
                 os.mkdir(refTestDirName)
 
             Params.g_options.cwd_launch = refTestDirName
-            run_program(testName)
+            tmpl = "%s"
+            for arg in arguments:
+                tmpl = tmpl + " " + arg
+            run_program(testName, tmpl)
 
             print "Remember to commit " + refTestDirName
             return 0
@@ -846,7 +852,7 @@
             #os.system("./waf --cwd regression/traces --run " +
             #  testName + " > /dev/null 2>&1")
             Params.g_options.cwd_launch = "traces"
-            run_program(testName, command_template=get_command_template())
+            run_program(testName, command_template=get_command_template(arguments))
 
             if verbose:
                 #diffCmd = "diff traces " + refTestDirName + " | head"