MCPcopy Create free account
hub / github.com/boostorg/build / run_build_system

Method run_build_system

v2/test/BoostBuild.py:414–515  ·  view source on GitHub ↗
(self, extra_args=None, subdir="", stdout=None,
        stderr="", status=0, match=None, pass_toolset=None,
        use_test_config=None, ignore_toolset_requirements=None,
        expected_duration=None, **kw)

Source from the content-addressed store, hash-verified

412 annotation("STDERR", self.stderr())
413
414 def run_build_system(self, extra_args=None, subdir="", stdout=None,
415 stderr="", status=0, match=None, pass_toolset=None,
416 use_test_config=None, ignore_toolset_requirements=None,
417 expected_duration=None, **kw):
418
419 assert extra_args.__class__ is not str
420
421 if os.path.isabs(subdir):
422 print("You must pass a relative directory to subdir <%s>." % subdir
423 )
424 return
425
426 self.previous_tree, dummy = tree.build_tree(self.workdir)
427
428 if match is None:
429 match = self.match
430
431 if pass_toolset is None:
432 pass_toolset = self.pass_toolset
433
434 if use_test_config is None:
435 use_test_config = self.use_test_config
436
437 if ignore_toolset_requirements is None:
438 ignore_toolset_requirements = self.ignore_toolset_requirements
439
440 try:
441 kw["program"] = []
442 kw["program"] += self.program
443 if extra_args:
444 kw["program"] += extra_args
445 if pass_toolset:
446 kw["program"].append("toolset=" + self.toolset)
447 if use_test_config:
448 kw["program"].append('--test-config="%s"' % os.path.join(
449 self.original_workdir, "test-config.jam"))
450 if ignore_toolset_requirements:
451 kw["program"].append("--ignore-toolset-requirements")
452 if "--python" in sys.argv:
453 kw["program"].append("--python")
454 kw["chdir"] = subdir
455 self.last_program_invocation = kw["program"]
456 build_time_start = time.time()
457 apply(TestCmd.TestCmd.run, [self], kw)
458 build_time_finish = time.time()
459 except:
460 self.dump_stdio()
461 raise
462
463 old_last_build_timestamp = self.last_build_timestamp
464 self.tree, self.last_build_timestamp = tree.build_tree(self.workdir)
465 self.difference = tree.tree_difference(self.previous_tree, self.tree)
466 if self.difference.empty():
467 # If nothing has been changed by this build and sufficient time has
468 # passed since the last build that actually changed something,
469 # there is no need to wait for touched or newly created files to
470 # start getting newer timestamps than the currently existing ones.
471 self.last_build_timestamp = old_last_build_timestamp

Callers 15

basicFunction · 0.95
ignore_minus_nFunction · 0.95
failed_targetFunction · 0.95
missing_targetFunction · 0.95
build_onceFunction · 0.95
return_statusFunction · 0.95
save_restoreFunction · 0.95
basic_jam_action_testFunction · 0.95
test_basicFunction · 0.95
test_absolute_pathsFunction · 0.95

Calls 9

dump_stdioMethod · 0.95
fail_testMethod · 0.95
maybe_do_diffMethod · 0.95
annotationFunction · 0.85
appendMethod · 0.80
emptyMethod · 0.80
ignore_directoriesMethod · 0.80
stdoutMethod · 0.80
stderrMethod · 0.80