Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
eli-schwartz committed Nov 17, 2024
1 parent 00b331e commit 2c558ff
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions run_project_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,12 +569,12 @@ def run_test_inprocess(testdir: str) -> T.Tuple[int, str, str, str]:
os.chdir(testdir)
test_log_fname = os.path.join('meson-logs', 'testlog.txt')
try:
returncode_test = mtest.run_with_args(['--no-rebuild'])
returncode_test = mtest.run_with_args([])
if os.path.exists(test_log_fname):
test_log = _run_ci_include([test_log_fname])
else:
test_log = ''
returncode_benchmark = mtest.run_with_args(['--no-rebuild', '--benchmark', '--logbase', 'benchmarklog'])
returncode_benchmark = mtest.run_with_args(['--benchmark', '--logbase', 'benchmarklog'])
finally:
sys.stdout = old_stdout
sys.stderr = old_stderr
Expand Down Expand Up @@ -712,7 +712,14 @@ def _run_test(test: TestDef,
# Build with subprocess
def build_step() -> None:
build_start = time.time()
pc, o, _ = Popen_safe(compile_commands + dir_args, cwd=test_build_dir, stderr=subprocess.STDOUT)

if backend is Backend.ninja:
# FIXME: meson test inprocess does not handle running ninja via StringIO
targets = ['all', 'meson-test-prereq', 'meson-benchmark-prereq']
else:
targets = []

pc, o, _ = Popen_safe(compile_commands + dir_args + targets, cwd=test_build_dir, stderr=subprocess.STDOUT)
testresult.add_step(BuildStep.build, o, '', '', time.time() - build_start)
if should_fail == 'build':
if pc.returncode != 0:
Expand Down

0 comments on commit 2c558ff

Please sign in to comment.