tests: rename env vars for tests
authorMarek Chalupa <mchqwerty@gmail.com>
Fri, 28 Nov 2014 08:41:50 +0000 (09:41 +0100)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 28 Nov 2014 11:27:34 +0000 (13:27 +0200)
Rename WAYLAND_TESTS_NO_TIMEOUTS to WAYLAND_TEST_NO_TIMEOUTS.
Further rename NO_ASSERT_LEAK_CHECK to WAYLAND_TEST_NO_LEAK_CHECK.
Now the naming is consistent not only here, in Wayland, but even with
naming of weston env varibles related to testing.

This is version 2 of the patch. The first version just renamed
NO_ASSERT_LEAK_CHECK to WAYLAND_TEST_NO_LEAK_CHECK.

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Bryce Harrington <b.harrington@samsung.com>
tests/test-runner.c

index d965a43..67763b3 100644 (file)
@@ -42,11 +42,14 @@ 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_TEST_NO_LEAK_CHECK environment variable. */
 int leak_check_enabled;
 
 /* when this var is set to 0, every call to test_set_timeout() is
  * suppressed - handy when debugging the test. Can be set by
- * WAYLAND_TESTS_NO_TIMEOUTS evnironment var */
+ * WAYLAND_TEST_NO_TIMEOUTS evnironment var */
 static int timeouts_enabled = 1;
 
 extern const struct test __start_test_section, __stop_test_section;
@@ -234,8 +237,8 @@ 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");
-       timeouts_enabled = !getenv("WAYLAND_TESTS_NO_TIMEOUTS");
+       leak_check_enabled = !getenv("WAYLAND_TEST_NO_LEAK_CHECK");
+       timeouts_enabled = !getenv("WAYLAND_TEST_NO_TIMEOUTS");
 
        if (argc == 2 && strcmp(argv[1], "--help") == 0)
                usage(argv[0], EXIT_SUCCESS);