[glib/skip-debug-only-tests] testsuite: Make tests not fail in !debug builds




commit 3db1d260eefac8364b20394db4bcf1098de84d1f
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat May 28 08:01:27 2022 -0400

    testsuite: Make tests not fail in !debug builds
    
    Some of our tests rely on on warning that only
    occur in debug builds. Skip them in non-debug
    builds.
    
    Fixes: #2656

 gobject/tests/object.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/gobject/tests/object.c b/gobject/tests/object.c
index 2519b00340..e1a98c72c5 100644
--- a/gobject/tests/object.c
+++ b/gobject/tests/object.c
@@ -122,6 +122,11 @@ test_object_constructor_infanticide (void)
   GObject *obj;
   int i;
 
+#ifndef G_ENABLE_DEBUG
+  g_test_skip ("skip tests that rely on debug-only warnings");
+  return;
+#endif
+
   g_test_bug ("https://bugzilla.gnome.org/show_bug.cgi?id=661576";);
 
   for (i = 0; i < 1000; i++)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]