diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2017-10-27 14:39:10 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2018-02-15 12:51:24 +0000 |
commit | 2a64ed855e6db81c3df4659e1066f777b9bacc8c (patch) | |
tree | 2231b7f6571b017a475adf527cc46f8f01ebde7b /mesonbuild/mesonmain.py | |
parent | 9dc995b3e92a029fb1e563d1ca19365ac5fec804 (diff) | |
download | meson-2a64ed855e6db81c3df4659e1066f777b9bacc8c.zip meson-2a64ed855e6db81c3df4659e1066f777b9bacc8c.tar.gz meson-2a64ed855e6db81c3df4659e1066f777b9bacc8c.tar.bz2 |
Verify that failing tests are failing with an error, not a python exception
PR #2527 suggests "making failing tests more strict about failing
gracefully".
To achive this, make meson exit with distinct exit statuses for meson errors
and python exceptions, and check the exit status is as expected for failing
tests.
I can't see how to write a test for this, within the current framework.
You can test this change by reverting the fix (but not the test) from commit
1a159db8 and verifying that 'test cases/failing/66 string as link target'
fails.
Diffstat (limited to 'mesonbuild/mesonmain.py')
-rw-r--r-- | mesonbuild/mesonmain.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index 073e505..7966d70 100644 --- a/mesonbuild/mesonmain.py +++ b/mesonbuild/mesonmain.py @@ -376,11 +376,12 @@ def run(original_args, mainfile=None): mlog.log("\nA full log can be found at", mlog.bold(logfile)) if os.environ.get('MESON_FORCE_BACKTRACE'): raise + return 1 else: if os.environ.get('MESON_FORCE_BACKTRACE'): raise traceback.print_exc() - return 1 + return 2 finally: mlog.shutdown() |