2 check_LTLIBRARIES = libgimarshallingtests.la
3 test_typelibs = GIMarshallingTests-1.0.typelib
5 nodist_libgimarshallingtests_la_SOURCES = $(GI_DATADIR)/tests/gimarshallingtests.c $(GI_DATADIR)/tests/gimarshallingtests.h
6 libgimarshallingtests_la_CFLAGS = $(GLIB_CFLAGS)
7 libgimarshallingtests_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS) -no-undefined
9 # This is a hack to make sure a shared library is built
10 libgimarshallingtests.la: $(libgimarshallingtests_la_OBJECTS) $(libgimarshallingtests_la_DEPENDENCIES)
11 $(AM_V_GEN) $(LINK) -rpath $(pkgpyexecdir) $(libgimarshallingtests_la_LDFLAGS) $(libgimarshallingtests_la_OBJECTS) $(libgimarhallingtests_la_LIBADD) $(LIBS)
13 GIMarshallingTests-1.0.gir: libgimarshallingtests.la Makefile
14 $(AM_V_GEN) g-ir-scanner --include=Gio-2.0 \
15 --namespace=GIMarshallingTests --nsversion=1.0 --symbol-prefix=gi_marshalling_tests \
16 --warn-all --warn-error \
17 --library=libgimarshallingtests.la \
18 --libtool="$(top_builddir)/libtool" \
20 $(nodist_libgimarshallingtests_la_SOURCES)
21 GIMarshallingTests-1.0.typelib: GIMarshallingTests-1.0.gir Makefile
22 $(AM_V_GEN) g-ir-compiler $< -o $@
24 # regress.c needs cairo
26 check_LTLIBRARIES += libregress.la
27 test_typelibs += Regress-1.0.typelib
28 nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
29 libregress_la_CFLAGS = $(GIO_CFLAGS) $(CAIRO_CFLAGS)
30 libregress_la_LDFLAGS = -module -avoid-version $(GIO_LIBS) $(CAIRO_LIBS) -no-undefined
32 libregress.la: $(libregress_la_OBJECTS) $(libregress_la_DEPENDENCIES)
33 $(AM_V_GEN) $(LINK) -rpath $(pkgpyexecdir) $(libregress_la_LDFLAGS) $(libregress_la_OBJECTS) $(libregress_la_LIBADD) $(LIBS)
35 # g-i doesn't ship these as shared libraries anymore; we build them here
36 Regress-1.0.gir: libregress.la Makefile
37 $(AM_V_GEN) g-ir-scanner --include=cairo-1.0 --include=Gio-2.0 \
38 --namespace=Regress --nsversion=1.0 \
39 --warn-all --warn-error \
40 --library=libregress.la \
41 --libtool="$(top_builddir)/libtool" \
43 $(nodist_libregress_la_SOURCES)
44 Regress-1.0.typelib: Regress-1.0.gir Makefile
45 $(AM_V_GEN) g-ir-compiler $< -o $@
50 gschemas.compiled: org.gnome.test.gschema.xml
51 glib-compile-schemas --targetdir=. --schema-file=$<
53 CLEANFILES += Regress-1.0.gir Regress-1.0.typelib GIMarshallingTests-1.0.gir GIMarshallingTests-1.0.typelib gschemas.compiled
55 check_LTLIBRARIES += testhelper.la
57 testhelper_la_CFLAGS = -I$(top_srcdir)/gi $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
58 testhelper_la_LDFLAGS = -module -avoid-version -no-undefined $(PYTHON_LIBS)
59 testhelper_la_LIBADD = $(GLIB_LIBS)
60 testhelper_la_SOURCES = \
66 # This is a hack to make sure a shared library is built
67 testhelper.la: $(testhelper_la_OBJECTS) $(testhelper_la_DEPENDENCIES)
68 $(AM_V_GEN) $(LINK) -rpath $(pkgpyexecdir) $(testhelper_la_LDFLAGS) $(testhelper_la_OBJECTS) $(testhelper_la_LIBADD) $(LIBS)
72 test -L $@ || $(LN_S) .libs/$@ $@
75 all: $(check_LTLIBRARIES:.la=.$(OS_EXT))
87 org.gnome.test.gschema.xml \
96 test_internal_api.py \
99 test_object_marshaling.py \
110 test_import_machinery.py \
111 test_overrides_glib.py \
112 test_overrides_pango.py \
113 test_overrides_gdk.py \
114 test_overrides_gtk.py \
116 test_generictreemodel.py \
119 test_resulttuple.py \
120 compat_test_pygtk.py \
122 gi/overrides/__init__.py \
123 gi/overrides/Regress.py \
127 rm -f $(check_LTLIBRARIES:.la=.$(OS_EXT)) file.txt~
129 DBUS_LAUNCH=$(shell which dbus-launch)
130 RUN_TESTS_ENV_VARS= \
131 PYTHONPATH=$(top_builddir):$(top_builddir)/tests:$${PYTHONPATH:+:$$PYTHONPATH} \
132 LD_LIBRARY_PATH=$(builddir)/.libs:$$LD_LIBRARY_PATH \
133 GI_TYPELIB_PATH=$(builddir):$$GI_TYPELIB_PATH \
134 XDG_DATA_DIRS=$$XDG_DATA_DIRS:/usr/share \
137 G_SLICE=debug-blocks \
138 TESTS_BUILDDIR=$(builddir)
140 # pygtkcompat tests need to be run in a separate process as they
141 # clobber global name space
142 check-local: $(check_LTLIBRARIES:.la=.$(OS_EXT)) $(test_typelibs) gschemas.compiled
143 export `$(DBUS_LAUNCH)` && \
144 $(RUN_TESTS_ENV_VARS) $(EXEC_NAME) $(PYTHON) -Wd $(srcdir)/runtests.py; rc=$$?; \
145 [ "$$rc" -ne 0 ] || [ -n "$$TEST_NAMES" ] || { TEST_NAMES=compat_test_pygtk $(RUN_TESTS_ENV_VARS) $(EXEC_NAME) $(PYTHON) -Wd -Werror::PendingDeprecationWarning -Werror::DeprecationWarning -Werror::RuntimeWarning $(srcdir)/runtests.py; rc=$$?; }; \
146 kill $$DBUS_SESSION_BUS_PID; \
150 EXEC_NAME="gdb --args" $(MAKE) check
153 EXEC_NAME="nemiver" $(MAKE) check
155 # Note G_SLICE in these check variations is intended to clobber the default set in RUN_TESTS_ENV_VARS
157 EXEC_NAME="G_SLICE=always-malloc G_DEBUG=gc-friendly \
158 valgrind --leak-check=full --show-possibly-lost=no --num-callers=20 \
159 --suppressions=$(top_srcdir)/tests/$(PYTHON_BASENAME).supp \
164 mkdir -p $(top_builddir)/tmp
165 EXEC_NAME="G_SLICE=always-malloc G_DEBUG=gc-friendly \
166 valgrind --leak-check=full --show-possibly-lost=no --num-callers=20 \
167 --suppressions=$(top_srcdir)/tests/$(PYTHON_BASENAME).supp \
168 --child-silent-after-fork=yes \
169 --log-file=$(top_builddir)/tmp/`git rev-parse HEAD | cut -c1-8`-$$TEST_NAMES.log \
174 mkdir -p $(top_builddir)/tmp
175 EXEC_NAME="G_SLICE=always-malloc G_DEBUG=gc-friendly \
176 valgrind --leak-check=full --show-possibly-lost=no --num-callers=20 \
177 --suppressions=$(top_srcdir)/tests/$(PYTHON_BASENAME).supp \
178 --child-silent-after-fork=yes \
179 --xml=yes --xml-file=$(top_builddir)/tmp/`git rev-parse HEAD | cut -c1-8`-$$TEST_NAMES.xml \