mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 13:11:13 +00:00
testsuite: Warn if a necessary env var is missing
Better to warn if we know why the tests are going to fail. Saves headscratching later.
This commit is contained in:
parent
cc8506ca15
commit
e1d85aeeb0
@ -773,9 +773,18 @@ test_nonsquare_symbolic (void)
|
||||
g_object_unref (info);
|
||||
}
|
||||
|
||||
static void
|
||||
require_env (const char *var)
|
||||
{
|
||||
if (g_getenv (var) == NULL)
|
||||
g_warning ("Some tests require %s to be set", var);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
require_env ("G_TEST_SRCDIR");
|
||||
|
||||
gtk_test_init (&argc, &argv);
|
||||
|
||||
g_test_add_func ("/icontheme/basics", test_basics);
|
||||
|
Loading…
Reference in New Issue
Block a user