Add an env var to force meson to print a backtrace

This is really useful when debugging test failures. Without a stack
trace, you have to grep the source code for the error message.

Also set this in run_tests.py.
pull/1900/head
Nirbheek Chauhan 8 years ago
parent c4d7667675
commit 627190faf3
  1. 4
      mesonbuild/mesonmain.py

@ -312,7 +312,11 @@ def run(mainfile, args):
else:
mlog.log(mlog.red('\nMeson encountered an error:'))
mlog.log(e)
if os.environ.get('MESON_FORCE_BACKTRACE'):
raise
else:
if os.environ.get('MESON_FORCE_BACKTRACE'):
raise
traceback.print_exc()
return 1
return 0

Loading…
Cancel
Save