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 01:11:02 +0000 (01:11 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 7 Jan 2011 01:11:02 +0000 (01:11 +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 5079bc7..ccce33c 100644 (file)
@@ -164,7 +164,8 @@ noinst_PROGRAMS = \
        elements/autodetect
 
 AM_CFLAGS = $(GST_OBJ_CFLAGS) $(GST_CHECK_CFLAGS) $(CHECK_CFLAGS) \
-       $(GST_OPTION_CFLAGS) -DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\""
+       $(GST_OPTION_CFLAGS) -DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\"" \
+       -UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
 LDADD = $(GST_OBJ_LIBS) $(GST_CHECK_LIBS) $(CHECK_LIBS)
 
 # valgrind testing
@@ -210,7 +211,7 @@ elements_level_LDADD = $(LDADD) $(LIBM)
 elements_matroskamux_LDADD = $(GST_BASE_LIBS) $(LDADD) $(LIBM)
 
 elements_rtpbin_buffer_list_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
-       $(WARNING_CFLAGS) $(ERROR_CFLAGS) $(GST_CHECK_CFLAGS)
+       $(WARNING_CFLAGS) $(ERROR_CFLAGS) $(GST_CHECK_CFLAGS) $(AM_CFLAGS)
 elements_rtpbin_buffer_list_LDADD = $(GST_PLUGINS_BASE_LIBS) \
              -lgstnetbuffer-@GST_MAJORMINOR@ -lgstrtp-@GST_MAJORMINOR@ \
              $(GST_BASE_LIBS) $(GST_LIBS_LIBS) $(GST_CHECK_LIBS)