[gtk/matthiasc/for-master: 113/113] testsuite: Warn if a necessary env var is missing
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 113/113] testsuite: Warn if a necessary env var is missing
- Date: Wed, 12 Feb 2020 17:20:25 +0000 (UTC)
commit e1d85aeeb0b4d7604c085efdab841640cdc3f083
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Feb 11 14:09:24 2020 -0500
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.
testsuite/gtk/icontheme.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/testsuite/gtk/icontheme.c b/testsuite/gtk/icontheme.c
index c6c7b638b1..85c120d68b 100644
--- a/testsuite/gtk/icontheme.c
+++ b/testsuite/gtk/icontheme.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]