harness: make sure g_assert() statements are always active
authorTim-Philipp Müller <tim@centricular.com>
Sat, 12 Apr 2014 18:48:15 +0000 (19:48 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 7 Jul 2015 07:38:31 +0000 (08:38 +0100)
We have code with side effects inside g_assert()s, so make
sure those are always enabled here (they might otherwise
get disabled for release builds).

libs/gst/check/Makefile.am
libs/gst/check/gstharness.c

index a08c459..84a1c5a 100644 (file)
@@ -13,6 +13,7 @@ libgstcheck_@GST_API_VERSION@_la_SOURCES =    \
        gsttestclock.c
 
 libgstcheck_@GST_API_VERSION@_la_CFLAGS = $(GST_OBJ_CFLAGS) \
+       -UG_DISABLE_ASSERT \
        -I$(top_builddir)/libs \
        -I$(top_builddir)/libs/gst/check \
        -I$(top_builddir)/libs/gst/check/libcheck
index ebac739..20ff39a 100644 (file)
 #include "config.h"
 #endif
 
+/* we have code with side effects in asserts, so make sure they are active */
+#ifdef G_DISABLE_ASSERT
+#error "GstHarness must be compiled with G_DISABLE_ASSERT undefined"
+#endif
+
 #include "gstharness.h"
 
 #include <stdio.h>