wscript
changeset 3872 8e757a83fb36
parent 3867 e29698e2e158
child 3918 3604c4e42fd1
--- a/wscript	Tue Nov 18 15:12:12 2008 +0000
+++ b/wscript	Wed Nov 19 17:17:07 2008 +0000
@@ -143,6 +143,10 @@
                    help=('Use sudo to setup suid bits on ns3 executables.'),
                    dest='enable_sudo', action='store_true',
                    default=False)
+    opt.add_option('--with-regression-traces',
+                   help=('Path to the regression reference traces directory'),
+                   default=None,
+                   dest='regression_traces', type="string")
 
     # options provided in a script in a subdirectory named "src"
     opt.sub_options('src')
@@ -193,6 +197,11 @@
 
     variant_env['INCLUDEDIR'] = os.path.join(variant_env['PREFIX'], 'include')
 
+    if Params.g_options.regression_traces is not None:
+        variant_env['REGRESSION_TRACES'] = os.path.join("..", Params.g_options.regression_traces)
+    else:
+        variant_env['REGRESSION_TRACES'] = None
+
     if Params.g_options.enable_gcov:
         variant_name += '-gcov'
         variant_env.append_value('CCFLAGS', '-fprofile-arcs')
@@ -463,10 +472,14 @@
     if Params.g_options.regression or Params.g_options.regression_generate:
         if not env['DIFF']:
             Params.fatal("Cannot run regression tests: the 'diff' program is not installed.")
+
         _dir = os.getcwd()
         os.chdir("regression")
+        regression_traces = env['REGRESSION_TRACES']
+        if not regression_traces:
+            regression_traces = None
         try:
-            regression.run_regression()
+            regression.run_regression(regression_traces)
         finally:
             os.chdir(_dir)