MCPcopy Index your code
hub / github.com/nodejs/node / run_tests

Method run_tests

deps/v8/tools/testrunner/utils/test_utils.py:196–225  ·  view source on GitHub ↗

Executes the test runner with captured output.

(
      self, *args, baseroot='testroot1', config_overrides=None,
      with_build_config=True, outdir='out', **kwargs)

Source from the content-addressed store, hash-verified

194 pool.setup_testing()
195
196 def run_tests(
197 self, *args, baseroot='testroot1', config_overrides=None,
198 with_build_config=True, outdir='out', **kwargs):
199 """Executes the test runner with captured output."""
200 with temp_base(baseroot=baseroot) as basedir:
201 if with_build_config:
202 setup_build_config(basedir, outdir)
203 override_build_config(basedir, **(config_overrides or {}))
204 json_out_path = None
205 def resolve_arg(arg):
206 """Some arguments come as function objects to be called (resolved)
207 in the context of a temporary test configuration"""
208 nonlocal json_out_path
209 if arg == with_json_output:
210 json_out_path = with_json_output(basedir)
211 return json_out_path
212 return arg
213 resolved_args = [resolve_arg(arg) for arg in args]
214 with capture() as (stdout, stderr):
215 sys_args = ['--command-prefix', sys.executable] + resolved_args
216 if kwargs.get('infra_staging', False):
217 sys_args.append('--infra-staging')
218 else:
219 sys_args.append('--no-infra-staging')
220 runner = self.get_runner_class()(basedir=basedir)
221 code = runner.execute(sys_args)
222 json_out = clean_json_output(json_out_path, basedir)
223 test_schedule = test_schedule_log(json_out_path)
224 return TestResult(
225 stdout.getvalue(), stderr.getvalue(), code, json_out, test_schedule, self)
226
227 def get_runner_options(self, baseroot='testroot1'):
228 """Returns a list of all flags parsed by the test runner."""

Callers 15

testPassMethod · 0.45
testPassHeavyMethod · 0.45
testShardedProcMethod · 0.45
testShardedMethod · 0.45
testFailMethod · 0.45
testGNMethod · 0.45
testRDBMethod · 0.45
testAutoDetectMethod · 0.45
testLimitedPreloadingMethod · 0.45

Calls 11

get_runner_classMethod · 0.95
temp_baseFunction · 0.85
setup_build_configFunction · 0.85
override_build_configFunction · 0.85
clean_json_outputFunction · 0.85
test_schedule_logFunction · 0.85
TestResultClass · 0.85
captureFunction · 0.70
getMethod · 0.65
appendMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected