When running tests under "make check" or similar to take advantage
of facilities like AM_TESTS_ENVIRONMENT and AX_VALGRIND_CHECK, it's
more straightforward to set an environment variable than to pass a
command-line option.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://gitlab.freedesktop.org/dbus/dbus/issues/218
if (argc > 2)
only = argv[2];
else
- only = NULL;
+ only = _dbus_getenv ("DBUS_TEST_ONLY");
if (dir == NULL)
_dbus_test_fatal ("Must specify test data directory as argv[1] or in DBUS_TEST_DATA env variable");
if (argc > 2)
specific_test = argv[2];
else
- specific_test = NULL;
+ specific_test = _dbus_getenv ("DBUS_TEST_ONLY");
_dbus_run_tests (test_data_dir, specific_test);
return _dbus_test_done_testing ();