wscript
changeset 4114 a6c5ccfa3451
parent 4110 04170734fa8b
child 4115 ec4e46b9547b
--- a/wscript	Fri Jan 23 15:18:03 2009 +0000
+++ b/wscript	Sat Jan 24 12:25:52 2009 +0000
@@ -415,6 +415,15 @@
         if not Options.options.compile_targets:
             Options.options.compile_targets = os.path.basename(program_name)
 
+    if Options.options.regression or Options.options.regression_generate:
+        if not env['DIFF']:
+            raise Utils.WafError("Cannot run regression tests: the 'diff' program is not installed.")
+
+        regression_traces = env['REGRESSION_TRACES']
+        if not regression_traces:
+            raise Utils.WafError("Cannot run regression tests: reference traces directory not given"
+                                 " (--with-regression-traces configure option)")
+        regression.run_regression(bld, regression_traces)
 
 
 def get_command_template(*arguments):
@@ -435,18 +444,6 @@
     if Options.commands['check']:
         _run_waf_check()
 
-    if Options.options.regression or Options.options.regression_generate:
-        if not env['DIFF']:
-            raise Utils.WafError("Cannot run regression tests: the 'diff' program is not installed.")
-
-        regression_traces = env['REGRESSION_TRACES']
-        if not regression_traces:
-            raise Utils.WafError("Cannot run regression tests: reference traces directory not given"
-                                 " (--with-regression-traces configure option)")
-        retval = regression.run_regression(regression_traces)
-        if retval:
-            sys.exit(retval)
-
     if Options.options.lcov_report:
         lcov_report()