[gtk/ci-gtk3-update] testsuite: Handle icontheme test better
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ci-gtk3-update] testsuite: Handle icontheme test better
- Date: Fri, 13 Mar 2020 16:32:39 +0000 (UTC)
commit 41330b6c034fd08e1f52c430374d6488501b4d69
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Feb 13 10:56:26 2020 -0500
testsuite: Handle icontheme test better
Skip just the failing tests in release builds.
testsuite/gtk/icontheme.c | 16 ++++++++++++++++
testsuite/gtk/meson.build | 8 --------
2 files changed, 16 insertions(+), 8 deletions(-)
---
diff --git a/testsuite/gtk/icontheme.c b/testsuite/gtk/icontheme.c
index cf466471f3..7eed015ff2 100644
--- a/testsuite/gtk/icontheme.c
+++ b/testsuite/gtk/icontheme.c
@@ -166,6 +166,11 @@ assert_lookup_order (const char *icon_name,
GtkIconInfo *info;
GList *l;
+/* this hack is only usable in debug builds */
+#ifndef G_ENABLE_DEBUG
+ g_assert_not_reached ();
+#endif
+
debug_flags = gtk_get_debug_flags ();
gtk_set_debug_flags (debug_flags | GTK_DEBUG_ICONTHEME);
g_log_set_writer_func (log_writer, NULL, NULL);
@@ -196,6 +201,15 @@ assert_lookup_order (const char *icon_name,
gtk_set_debug_flags (debug_flags);
}
+#ifdef G_ENABLE_DEBUG
+#define require_debug()
+#else
+#define require_debug() \
+ g_test_skip ("requires G_ENABLE_DEBUG"); \
+ return;
+#endif
+
+
static void
test_basics (void)
{
@@ -206,6 +220,8 @@ test_basics (void)
static void
test_lookup_order (void)
{
+ require_debug ();
+
assert_lookup_order ("foo-bar-baz", 16, GTK_ICON_LOOKUP_GENERIC_FALLBACK,
"foo-bar-baz",
"foo-bar",
diff --git a/testsuite/gtk/meson.build b/testsuite/gtk/meson.build
index fc3b59fd1a..206af0dc2c 100644
--- a/testsuite/gtk/meson.build
+++ b/testsuite/gtk/meson.build
@@ -54,11 +54,6 @@ tests = [
xfail = [
]
-# Tests that are expected to fail on non-debug builds
-xfail_nodebug = [
- 'icontheme', # Overrides debugging messages
-]
-
is_debug = get_option('buildtype').startswith('debug')
test_cargs = []
@@ -89,9 +84,6 @@ foreach t : tests
install_dir: installed_test_bindir)
expect_fail = xfail.contains(test_name)
- if not is_debug
- expect_fail = xfail_nodebug.contains(test_name)
- endif
test(test_name, test_exe,
args: [ '--tap', '-k' ],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]