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.
@@ -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
