mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-03 12:19:20 +02:00
glib: Define cleanup lists for glib tests
This allows G_CLEANUP to be used in the tests, and from things like G_PRIVATE_INIT and so on. https://bugzilla.gnome.org/show_bug.cgi?id=711744
This commit is contained in:
@@ -2,7 +2,7 @@ include $(top_srcdir)/glib-tap.mk
|
||||
|
||||
LDADD = $(top_builddir)/glib/libglib-2.0.la -lm
|
||||
AM_CPPFLAGS = -g $(glib_INCLUDES) $(GLIB_DEBUG_FLAGS)
|
||||
DEFS = -DG_LOG_DOMAIN=\"GLib\" -DEXEEXT=\"$(EXEEXT)\"
|
||||
DEFS = -DG_LOG_DOMAIN=\"GLib\" -DEXEEXT=\"$(EXEEXT)\" -DG_CLEANUP_SCOPE=tests_cleanup
|
||||
AM_CFLAGS = $(GLIB_WARN_CFLAGS)
|
||||
|
||||
# These tests corrupt the gcov bookkeeping, so we
|
||||
|
@@ -370,6 +370,8 @@ test_static_private5 (void)
|
||||
g_thread_join (thread[i]);
|
||||
}
|
||||
|
||||
G_CLEANUP_DEFINE
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
|
@@ -4,7 +4,7 @@ SUBDIRS = gobject refcount
|
||||
|
||||
LDADD = $(top_builddir)/glib/libglib-2.0.la
|
||||
AM_CPPFLAGS = $(gmodule_INCLUDES) $(GLIB_DEBUG_FLAGS)
|
||||
DEFS = -DGLIB_DISABLE_DEPRECATION_WARNINGS -DG_LOG_DOMAIN=\"GLib\"
|
||||
DEFS = -DGLIB_DISABLE_DEPRECATION_WARNINGS -DG_LOG_DOMAIN=\"GLib\" -DG_CLEANUP_SCOPE=tests_cleanup
|
||||
AM_CFLAGS = -g
|
||||
|
||||
# Some random programs that appear not to be testcases and not used from any testcases
|
||||
|
Reference in New Issue
Block a user