diff options
author | Jacques Lucke <jacques@blender.org> | 2020-08-26 23:02:02 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-08-26 23:02:02 +0300 |
commit | 8a9912eaf81bab73a12621a4c0987c37a865fe50 (patch) | |
tree | 0e51335adf6fdf6ccfa5b0f240ebc72913d18513 /tests/gtests | |
parent | d8cf6ee3163b15d70ba9068fa198d433ce6f3d8f (diff) |
Tests: fail automated tests on memory leaks and other internal errors
This adds a new `--debug-exit-on-error` flag. When it is set, Blender
will abort with a non-zero exit code when there are internal errors.
Currently, "internal errors" includes memory leaks detected by
guardedalloc and error/fatal log entries in clog.
The new flag is passed to Blender in various places where automated
tests are run. Furthermore, the `--debug-memory` flag is used in tests,
because that makes the verbose output more useful, when dealing
with memory leaks.
Reviewers: brecht, sergey
Differential Revision: https://developer.blender.org/D8665
Diffstat (limited to 'tests/gtests')
-rw-r--r-- | tests/gtests/testing/testing_main.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/gtests/testing/testing_main.cc b/tests/gtests/testing/testing_main.cc index e9313b31909..6238101b319 100644 --- a/tests/gtests/testing/testing_main.cc +++ b/tests/gtests/testing/testing_main.cc @@ -50,6 +50,7 @@ int main(int argc, char **argv) { MEM_use_guarded_allocator(); MEM_init_memleak_detection(); + MEM_enable_fail_on_memleak(); testing::InitGoogleTest(&argc, argv); BLENDER_GFLAGS_NAMESPACE::ParseCommandLineFlags(&argc, &argv, true); google::InitGoogleLogging(argv[0]); |