[PATCH wayland] tests: rename NO_ASSERT_LEAK_CHECK

Marek Chalupa mchqwerty at gmail.com
Wed Nov 19 03:00:10 PST 2014


This env variable is used for turning off the leak checks in tests.
Rename it to WAYLAND_TESTS_NO_LEAK_CHECK, so that it is consistent
with WAYLAND_TESTS_NO_TIMEOUTS.

Signed-off-by: Marek Chalupa <mchqwerty at gmail.com>
---
 tests/test-runner.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/test-runner.c b/tests/test-runner.c
index 09c50e2..a6c75a9 100644
--- a/tests/test-runner.c
+++ b/tests/test-runner.c
@@ -42,6 +42,9 @@ static void (*sys_free)(void*);
 static void* (*sys_realloc)(void*, size_t);
 static void* (*sys_calloc)(size_t, size_t);
 
+/* when set to 1, check if tests are not leaking memory and opened files.
+ * It is turned on by default. It can be turned off by
+ * WAYLAND_TESTS_NO_LEAK_CHECK environment variable. */
 int leak_check_enabled;
 
 /* when this var is set to 0, every call to test_set_timeout() is
@@ -234,7 +237,7 @@ int main(int argc, char *argv[])
 	sys_malloc = dlsym(RTLD_NEXT, "malloc");
 	sys_free = dlsym(RTLD_NEXT, "free");
 
-	leak_check_enabled = !getenv("NO_ASSERT_LEAK_CHECK");
+	leak_check_enabled = !getenv("WAYLAND_TESTS_NO_LEAK_CHECK");
 	timeouts_enabled = !getenv("WAYLAND_TESTS_NO_TIMEOUTS");
 
 	if (argc == 2 && strcmp(argv[1], "--help") == 0)
-- 
2.1.0



More information about the wayland-devel mailing list