summaryrefslogtreecommitdiff
path: root/tests/gobject/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gobject/Makefile.am')
-rw-r--r--tests/gobject/Makefile.am124
1 files changed, 46 insertions, 78 deletions
diff --git a/tests/gobject/Makefile.am b/tests/gobject/Makefile.am
index e58b1589b..5c3f18bbf 100644
--- a/tests/gobject/Makefile.am
+++ b/tests/gobject/Makefile.am
@@ -1,31 +1,50 @@
-include $(top_srcdir)/Makefile.decl
+include $(top_srcdir)/glib.mk
-AM_CPPFLAGS = \
- $(gmodule_INCLUDES) \
- -DGLIB_DISABLE_DEPRECATION_WARNINGS \
- $(GLIB_DEBUG_FLAGS)
-
-libglib = $(top_builddir)/glib/libglib-2.0.la
-libgthread = $(top_builddir)/gthread/libgthread-2.0.la
-libgmodule = $(top_builddir)/gmodule/libgmodule-2.0.la
-libgobject = $(top_builddir)/gobject/libgobject-2.0.la
+LDADD = $(top_builddir)/glib/libglib-2.0.la $(top_builddir)/gobject/libgobject-2.0.la
+AM_CPPFLAGS = $(gmodule_INCLUDES) $(GLIB_DEBUG_FLAGS)
+DEFS = -DGLIB_DISABLE_DEPRECATION_WARNINGS -DG_LOG_DOMAIN=\"GLib\"
+AM_CFLAGS = -g
+# So far, only two gtester-ified cases
+test_programs = \
+ gvalue-test \
+ paramspec-test \
+ $(NULL)
-# libtool dependency tracking seems broken. this is currently
-# required to get the tests to dynamic link against the in-tree
-# libglib instead of the system one
-libgobject += $(libglib)
+# These are not yet gtester-ified, so mark them as for 'installed' only so we
+# don't run them under the framework. We will handle them manually below.
+installed_test_programs = \
+ deftype \
+ accumulator \
+ defaultiface \
+ dynamictype \
+ override \
+ singleton \
+ references \
+ $(NULL)
-########################################################################
+# Don't install these ones, and keep them out of 'make check' because they take too long...
+noinst_PROGRAMS += \
+ performance \
+ performance-threaded \
+ $(NULL)
+
+# Run the 'installed' tests manually in-tree.
+# This will cause them to be built even if installed tests are disabled.
+check_PROGRAMS += $(installed_test_programs) $(installed_test_extra_programs)
+TESTS = $(installed_test_programs)
+TESTS_ENVIRONMENT = \
+ LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset \
+ MALLOC_CHECK_=2 \
+ MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
-noinst_LTLIBRARIES = libtestgobject.la
+accumulator_SOURCES = accumulator.c testmarshal.c testmarshal.h
+defaultiface_SOURCES = defaultiface.c testmodule.c testmodule.h
+dynamictype_SOURCES = dynamictype.c testmodule.c testmodule.h
-libtestgobject_la_SOURCES = \
- testcommon.h \
- testmarshal.h \
- testmarshal.c \
- testmodule.c \
- testmodule.h
+if ENABLE_TIMELOOP
+installed_test_programs += timeloop-closure
+endif
if CROSS_COMPILING
glib_genmarshal=$(GLIB_GENMARSHAL)
@@ -45,63 +64,14 @@ testmarshal.c: @REBUILD@ testmarshal.h testmarshal.list $(glib_genmarshal)
&& cp xgen-gmc testmarshal.c \
&& rm -f xgen-gmc xgen-gmc~
-BUILT_SOURCES = testmarshal.h testmarshal.c
-CLEANFILES = stamp-testmarshal.h
-
-########################################################################
-
-LDADD = libtestgobject.la $(libgobject)
+BUILT_SOURCES += testmarshal.h testmarshal.c
+CLEANFILES += stamp-testmarshal.h
-test_programs = \
- deftype \
- gvalue-test \
- paramspec-test \
- accumulator \
- defaultiface \
- dynamictype \
- override \
- singleton \
- references
-
-performance_programs = \
- performance \
- performance-threaded
-
-performance_LDADD = $(libgobject) $(libgthread)
-performance_threaded_LDADD = $(libgobject) $(libgthread)
-check_PROGRAMS = $(test_programs)
-noinst_PROGRAMS = $(performance_programs) testgobject
-
-if ENABLE_TIMELOOP
-noinst_PROGRAMS += timeloop-closure
-endif
-
-TESTS = $(test_programs) $(performance_programs)
-TESTS_ENVIRONMENT = srcdir=$(srcdir) \
- LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset \
- MALLOC_CHECK_=2 \
- MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
-
-if BUILDOPT_INSTALL_TESTS
-insttestdir = $(pkglibexecdir)/installed-tests
-insttest_PROGRAMS = $(test_programs)
-
-testmetadir = $(datadir)/installed-tests/$(PACKAGE)
-testmeta_DATA = $(test_programs:=.test)
-
-%.test: %$(EXEEXT) Makefile
- $(AM_V_GEN) (echo '[Test]' > $@.tmp; \
- echo 'Type=session' >> $@.tmp; \
- echo 'Exec=env G_TEST_DATA=$(pkglibexecdir)/installed-tests $(pkglibexecdir)/installed-tests/$<' >> $@.tmp; \
- mv $@.tmp $@)
-endif
-
-########################################################################
-
-EXTRA_DIST += \
+EXTRA_DIST += \
+ testcommon.h \
testmarshal.list
-BUILT_EXTRA_DIST = \
+BUILT_EXTRA_DIST += \
testmarshal.h \
testmarshal.c
@@ -115,5 +85,3 @@ distclean-local:
if test $(srcdir) = .; then :; else \
rm -f $(BUILT_EXTRA_DIST); \
fi
-
-