aboutsummaryrefslogtreecommitdiff
path: root/run_project_tests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-02-18 13:54:50 +0200
committerGitHub <noreply@github.com>2018-02-18 13:54:50 +0200
commit55a7c265c11e0f3e8a94cf9f4fd0b5f036a717d2 (patch)
tree29e6686ece50f119e8a4e850653c221b6872b975 /run_project_tests.py
parent1841d53a84be13a3ba989b917930b824aafdac26 (diff)
parent7297e9f7a3581d132b0bccc47da4435c7315c74b (diff)
downloadmeson-55a7c265c11e0f3e8a94cf9f4fd0b5f036a717d2.zip
meson-55a7c265c11e0f3e8a94cf9f4fd0b5f036a717d2.tar.gz
meson-55a7c265c11e0f3e8a94cf9f4fd0b5f036a717d2.tar.bz2
Merge pull request #2863 from jon-turney/exit-status-on-exception
Verify that failing tests are failing with an error, not a python exception
Diffstat (limited to 'run_project_tests.py')
-rwxr-xr-xrun_project_tests.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/run_project_tests.py b/run_project_tests.py
index 1d17000..9bbbbd0 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -321,9 +321,12 @@ def _run_test(testdir, test_build_dir, install_dir, extra_args, compiler, backen
mesonlog = no_meson_log_msg
gen_time = time.time() - gen_start
if should_fail == 'meson':
- if returncode != 0:
+ if returncode == 1:
return TestResult('', BuildStep.configure, stdo, stde, mesonlog, gen_time)
- return TestResult('Test that should have failed succeeded', BuildStep.configure, stdo, stde, mesonlog, gen_time)
+ elif returncode != 0:
+ return TestResult('Test exited with unexpected status {}'.format(returncode), BuildStep.configure, stdo, stde, mesonlog, gen_time)
+ else:
+ return TestResult('Test that should have failed succeeded', BuildStep.configure, stdo, stde, mesonlog, gen_time)
if returncode != 0:
return TestResult('Generating the build system failed.', BuildStep.configure, stdo, stde, mesonlog, gen_time)
# Touch the meson.build file to force a regenerate so we can test that