def run_reference_test(self, reference_traces_path, trace_output_path, program, arguments, is_pyscript): if not os.path.exists(reference_traces_path): print "Cannot locate reference traces in " + reference_traces_path return 1 if is_pyscript: script = os.path.abspath(os.path.join('..', *os.path.split(program))) argv = [self.env['PYTHON'], script] + arguments try: wutils.run_argv(argv, self.env, cwd=trace_output_path, force_no_valgrind=True) except Utils.WafError, ex: print >> sys.stderr, ex return 1
def run_reference_generate(self, trace_output_path, program, arguments, is_pyscript): if is_pyscript: script = os.path.abspath(os.path.join('..', *os.path.split(program))) argv = [self.env['PYTHON'], script] + arguments try: retval = wutils.run_argv(argv, self.env, cwd=trace_output_path, force_no_valgrind=True) except Utils.WafError, ex: print >> sys.stderr, ex return 1
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() # Set this so that the lists won't be printed when the user # exits the shell. bld.env['PRINT_BUILT_MODULES_AT_END'] = False if sys.platform == 'win32': shell = os.environ.get("COMSPEC", "cmd.exe") else: shell = os.environ.get("SHELL", "/bin/sh") env = bld.env os_env = { 'NS3_MODULE_PATH': os.pathsep.join(env['NS3_MODULE_PATH']), 'NS3_EXECUTABLE_PATH': os.pathsep.join(env['NS3_EXECUTABLE_PATH']), } wutils.run_argv([shell], env, os_env)
def run(self): proc_env = wutils.get_proc_env() wutils.run_argv([self.bld.env['PYTHON'], os.path.join("..", "utils", "python-unit-tests.py")], self.bld.env, proc_env, force_no_valgrind=True)