3 if ENABLE_INTROSPECTION
4 noinst_LTLIBRARIES += libregress.la libgimarshallingtests.la
6 nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
7 libregress_la_CFLAGS = $(GIO_CFLAGS) $(PYCAIRO_CFLAGS)
8 libregress_la_LDFLAGS = -module -avoid-version $(GIO_LIBS) $(PYCAIRO_LIBS)
9 nodist_libgimarshallingtests_la_SOURCES = $(GI_DATADIR)/tests/gimarshallingtests.c $(GI_DATADIR)/tests/gimarshallingtests.h
10 libgimarshallingtests_la_CFLAGS = $(GLIB_CFLAGS)
11 libgimarshallingtests_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS)
13 # This is a hack to make sure a shared library is built
14 libregress.la: $(libregress_la_OBJECTS) $(libregress_la_DEPENDENCIES)
15 $(LINK) -rpath $(pkgpyexecdir) $(libregress_la_LDFLAGS) $(libregress_la_OBJECTS) $(libregress_la_LIBADD) $(LIBS)
17 libgimarshallingtests.la: $(libgimarshallingtests_la_OBJECTS) $(libgimarshallingtests_la_DEPENDENCIES)
18 $(LINK) -rpath $(pkgpyexecdir) $(libgimarshallingtests_la_LDFLAGS) $(libgimarshallingtests_la_OBJECTS) $(libgimarhallingtests_la_LIBADD) $(LIBS)
20 # g-i doesn't ship these as shared libraries anymore; we build them here
21 Regress-1.0.gir: libregress.la Makefile
22 $(AM_V_GEN) g-ir-scanner --include=cairo-1.0 --include=Gio-2.0 \
23 --namespace=Regress --nsversion=1.0 \
24 --warn-all --warn-error \
25 --library=libregress.la \
26 --libtool="$(top_builddir)/libtool" \
28 $(nodist_libregress_la_SOURCES)
29 Regress-1.0.typelib: Regress-1.0.gir Makefile
30 $(AM_V_GEN) g-ir-compiler $< -o $@
32 GIMarshallingTests-1.0.gir: libgimarshallingtests.la Makefile
33 $(AM_V_GEN) g-ir-scanner --include=Gio-2.0 \
34 --namespace=GIMarshallingTests --nsversion=1.0 --symbol-prefix=gi_marshalling_tests \
35 --warn-all --warn-error \
36 --library=libgimarshallingtests.la \
37 --libtool="$(top_builddir)/libtool" \
39 $(nodist_libgimarshallingtests_la_SOURCES)
40 GIMarshallingTests-1.0.typelib: GIMarshallingTests-1.0.gir Makefile
41 $(AM_V_GEN) g-ir-compiler $< -o $@
43 gschemas.compiled: org.gnome.test.gschema.xml
44 glib-compile-schemas --targetdir=. --schema-file=$<
46 CLEANFILES += Regress-1.0.gir Regress-1.0.typelib GIMarshallingTests-1.0.gir GIMarshallingTests-1.0.typelib gschemas.compiled
49 noinst_LTLIBRARIES += testhelper.la
51 testhelper_la_CFLAGS = -I$(top_srcdir)/gobject -I$(top_srcdir)/glib $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
52 testhelper_la_LDFLAGS = -module -avoid-version
53 testhelper_la_LIBADD = $(GLIB_LIBS)
54 testhelper_la_SOURCES = \
60 # This is a hack to make sure a shared library is built
61 testhelper.la: $(testhelper_la_OBJECTS) $(testhelper_la_DEPENDENCIES)
62 $(LINK) -rpath $(pkgpyexecdir) $(testhelper_la_LDFLAGS) $(testhelper_la_OBJECTS) $(testhelper_la_LIBADD) $(LIBS)
66 test -L $@ || $(LN_S) .libs/$@ $@
69 all: $(LTLIBRARIES:.la=.so)
92 if ENABLE_INTROSPECTION
107 org.gnome.test.gschema.xml
109 EXTRA_DIST += $(TEST_FILES_STATIC) $(TEST_FILES_GI) $(TEST_FILES_GIO)
112 rm -f $(LTLIBRARIES:.la=.so) file.txt~
114 DBUS_LAUNCH=$(shell which dbus-launch)
115 RUN_TESTS_ENV_VARS= \
116 PYTHONPATH=$(top_builddir):$(top_builddir)/tests:$${PYTHONPATH:+:$$PYTHONPATH} \
117 LD_LIBRARY_PATH=$(builddir)/.libs:$$LD_LIBRARY_PATH \
118 GI_TYPELIB_PATH=$(builddir):$$GI_TYPELIB_PATH \
119 XDG_DATA_DIRS=$$XDG_DATA_DIRS:/usr/share \
120 TESTS_BUILDDIR=$(builddir)
121 RUN_TESTS_LAUNCH=$(RUN_TESTS_ENV_VARS) $(DBUS_LAUNCH) $(EXEC_NAME) $(PYTHON) $(srcdir)/runtests.py
123 # run tests in separately to avoid loading static and introspection bindings in the same process
124 check-local: $(LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib gschemas.compiled
125 TEST_FILES="$(TEST_FILES_STATIC)" $(RUN_TESTS_LAUNCH)
126 TEST_FILES="$(TEST_FILES_GI)" $(RUN_TESTS_LAUNCH)
128 TEST_FILES="$(TEST_FILES_GIO)" $(RUN_TESTS_LAUNCH)
132 EXEC_NAME="gdb --args" $(MAKE) check
135 EXEC_NAME="valgrind --suppressions=python.supp" G_SLICE=always-malloc G_DEBUG=gc-friendly $(MAKE) check
137 -include $(top_srcdir)/git.mk