[gtk/ebassi/fix-release-test] reftest: Avoid assertions being compiled out




commit 3749080eae64032c22ec436ded250f26e1c5ee83
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Jan 18 12:30:47 2022 +0000

    reftest: Avoid assertions being compiled out
    
    Calling functions inside a g_assert() means those functions will be
    compiled out when building with G_DISABLE_ASSERT.
    
    This fixes the release job in the CI pipeline.

 testsuite/reftests/gtk-reftest.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/testsuite/reftests/gtk-reftest.c b/testsuite/reftests/gtk-reftest.c
index 1dd1a080f2..f3af427c51 100644
--- a/testsuite/reftests/gtk-reftest.c
+++ b/testsuite/reftests/gtk-reftest.c
@@ -552,7 +552,8 @@ main (int argc, char **argv)
    * is the same as the reftest data, because we're using the
    * "file" property of GtkImage as a relative path in builder files.
    */
-  g_assert (chdir (basedir) == 0);
+  int res = chdir (basedir);
+  g_assert (res == 0);
 
   g_log_set_writer_func (log_writer, NULL, NULL);
 


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