checks: try to fix GstObject unit test on OSX

Seems like we get SIGBUS instead of SIGSEGV here when GLib crashes
where it shouldn't crash (and we even have a unit test for that!).
This commit is contained in:
Tim-Philipp Müller 2009-08-10 13:05:57 +01:00
parent 3bf19f0a45
commit 657c68fc99
2 changed files with 9 additions and 0 deletions

View file

@ -204,6 +204,7 @@ case $host_os in
darwin*)
AC_DEFINE_UNQUOTED(GST_EXTRA_MODULE_SUFFIX, [".dylib"], [Extra platform specific plugin suffix])
AC_DEFINE_UNQUOTED(GST_HAVE_UNSAFE_FORK, 1, [Defined when registry scanning through fork is unsafe])
AC_DEFINE_UNQUOTED(HAVE_OSX, 1, [Defined if compiling for OSX])
;;
cygwin*)
AC_DEFINE_UNQUOTED(GST_HAVE_UNSAFE_FORK, 1, [Defined when registry scanning through fork is unsafe])

View file

@ -470,8 +470,16 @@ gst_object_suite (void)
tcase_add_test (tc_chain, test_fake_object_parentage_dispose);
//tcase_add_checked_fixture (tc_chain, setup, teardown);
/* FIXME: GLib shouldn't crash here, but issue a warning and return a NULL
* object, or at least g_error() and then abort properly ... (tpm) */
#ifdef HAVE_OSX
/* on OSX we get SIGBUS instead it seems */
tcase_add_test_raise_signal (tc_chain, test_fail_abstract_new, SIGBUS);
#else
/* SEGV tests go last so we can debug the others */
tcase_add_test_raise_signal (tc_chain, test_fail_abstract_new, SIGSEGV);
#endif
return s;
}