[gtk/css-lookup-caching: 6/26] testsuite: Warn if a necessary env var is missing
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/css-lookup-caching: 6/26] testsuite: Warn if a necessary env var is missing
- Date: Thu, 13 Feb 2020 23:13:41 +0000 (UTC)
commit b414df14df35d82d5354fe5a0ef1b4ee8b26c4da
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]