Fix waf check

This commit is contained in:
Gustavo J. A. M. Carneiro
2011-09-20 11:23:59 +01:00
parent 39fce07e5d
commit acafde5087
2 changed files with 16 additions and 5 deletions

19
wscript
View File

@@ -838,11 +838,22 @@ def shutdown(ctx):
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):

View File

@@ -229,5 +229,5 @@ def run_python_program(program_string, env, visualize=False):
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)