--- a/wscript Mon Sep 19 19:56:58 2011 +0100
+++ b/wscript Tue Sep 20 11:23:59 2011 +0100
@@ -838,11 +838,22 @@
check_shell(bld)
-check_context = Build.BuildContext
-def check(bld):
+
+from waflib import Context, Build
+class CheckContext(Context.Context):
"""run the equivalent of the old ns-3 unit tests using test.py"""
- env = wutils.bld.env
- wutils.run_python_program("test.py -n -c core", env)
+ cmd = 'check'
+
+ def execute(self):
+
+ # first we execute the build
+ bld = Context.create_context("build")
+ bld.options = Options.options # provided for convenience
+ bld.cmd = "build"
+ bld.execute()
+
+ wutils.bld = bld
+ wutils.run_python_program("test.py -n -c core", bld.env)
class print_introspected_doxygen_task(Task.TaskBase):
--- a/wutils.py Mon Sep 19 19:56:58 2011 +0100
+++ b/wutils.py Tue Sep 20 11:23:59 2011 +0100
@@ -229,5 +229,5 @@
cwd = Options.cwd_launch
if visualize:
execvec.append("--SimulatorImplementationType=ns3::VisualSimulatorImpl")
- return run_argv([env['PYTHON']] + execvec, env, cwd=cwd)
+ return run_argv([env['PYTHON'][0]] + execvec, env, cwd=cwd)