aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test-runner.c
diff options
context:
space:
mode:
authorRob Bradford <rob@linux.intel.com>2012-08-16 18:12:04 -0700
committerKristian Høgsberg <krh@bitplanet.net>2012-08-29 14:10:20 -0400
commitc95c2dffb0a37ae50350319c52b30629c32f6660 (patch)
tree80c214aa34cf0d78bcdc687398129ec61bb949ea /tests/test-runner.c
parentAdd wl_shm_buffer_create() (diff)
downloadwayland-c95c2dffb0a37ae50350319c52b30629c32f6660.tar
wayland-c95c2dffb0a37ae50350319c52b30629c32f6660.tar.gz
wayland-c95c2dffb0a37ae50350319c52b30629c32f6660.tar.bz2
wayland-c95c2dffb0a37ae50350319c52b30629c32f6660.tar.lz
wayland-c95c2dffb0a37ae50350319c52b30629c32f6660.tar.xz
wayland-c95c2dffb0a37ae50350319c52b30629c32f6660.tar.zst
wayland-c95c2dffb0a37ae50350319c52b30629c32f6660.zip
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/test-runner.c')
-rw-r--r--tests/test-runner.c6
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);
}