tests: never disable g_assert() and cast checks for the unit tests
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 7 Jan 2011 00:53:11 +0000 (00:53 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 7 Jan 2011 00:53:11 +0000 (00:53 +0000)
The unit tests are riddled with g_assert() and friends, make sure we
don't disable assert and cast checks for the unit tests even if
this has been specified for the rest of the code base, e.g. via
--disable-glib-asserts.

tests/check/Makefile.am

index 25b3701..484c9f1 100644 (file)
@@ -155,8 +155,8 @@ noinst_HEADERS = \
 EXTRA_DIST = \
        libs/test_transform.c
 
-AM_CFLAGS = $(GST_OBJ_CFLAGS)
-AM_CXXFLAGS = $(GST_OBJ_CXXFLAGS)
+AM_CFLAGS = $(GST_OBJ_CFLAGS) -UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
+AM_CXXFLAGS = $(GST_OBJ_CXXFLAGS) -UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
 LDADD = $(top_builddir)/libs/gst/check/libgstcheck-@GST_MAJORMINOR@.la \
        $(top_builddir)/libs/gst/base/libgstbase-@GST_MAJORMINOR@.la \
        $(GST_OBJ_LIBS)
@@ -171,8 +171,10 @@ libs_gdp_LDADD = \
        $(top_builddir)/libs/gst/dataprotocol/libgstdataprotocol-@GST_MAJORMINOR@.la \
        $(LDADD)
 
-elements_fdsrc_CFLAGS=$(GST_OBJ_CFLAGS) -DTESTFILE=\"$(top_srcdir)/configure.ac\"
-elements_filesrc_CFLAGS=$(GST_OBJ_CFLAGS) -DTESTFILE=\"$(top_srcdir)/configure.ac\"
+elements_fdsrc_CFLAGS=$(GST_OBJ_CFLAGS) $(AM_CFLAGS) \
+       -DTESTFILE=\"$(top_srcdir)/configure.ac\"
+elements_filesrc_CFLAGS=$(GST_OBJ_CFLAGS) $(AM_CFLAGS) \
+       -DTESTFILE=\"$(top_srcdir)/configure.ac\"
 
 libs_controller_LDADD = \
        $(top_builddir)/libs/gst/controller/libgstcontroller-@GST_MAJORMINOR@.la \