mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	tests: rename env vars for tests
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>
This commit is contained in:
		
							parent
							
								
									93e352d058
								
							
						
					
					
						commit
						bef2948348
					
				
					 1 changed files with 6 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue