mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-31 22:25:25 -04:00
tests: Allow disabling leak checking assertions by env
Some code coverage tools trigger these assertions when run against the test suite since they don't free all their memory.
This commit is contained in:
parent
7d3ccec18e
commit
c95c2dffb0
1 changed files with 4 additions and 2 deletions
|
|
@ -95,8 +95,10 @@ run_test(const struct test *t)
|
|||
|
||||
cur_fds = count_open_fds();
|
||||
t->run();
|
||||
assert(cur_alloc == num_alloc && "memory leak detected in test.");
|
||||
assert(cur_fds == count_open_fds() && "fd leak detected");
|
||||
if (!getenv("NO_ASSERT_LEAK_CHECK")) {
|
||||
assert(cur_alloc == num_alloc && "memory leak detected in test.");
|
||||
assert(cur_fds == count_open_fds() && "fd leak detected");
|
||||
}
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue