diff options
author | Rob Bradford <rob@linux.intel.com> | 2012-08-16 18:12:04 -0700 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-08-29 14:10:20 -0400 |
commit | c95c2dffb0a37ae50350319c52b30629c32f6660 (patch) | |
tree | 80c214aa34cf0d78bcdc687398129ec61bb949ea /tests | |
parent | 7d3ccec18eda14a30c3edae608195898262f0d27 (diff) |
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.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-runner.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test-runner.c b/tests/test-runner.c index 63ce384..6c30649 100644 --- a/tests/test-runner.c +++ b/tests/test-runner.c @@ -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); } |