GTESTER = $(top_builddir)/glib/gtester # for the GLIB package GTESTER_REPORT = $(top_builddir)/glib/gtester-report # for the GLIB package NULL =
BUILT_SOURCES = BUILT_EXTRA_DIST = CLEANFILES = .log .trs DISTCLEANFILES = MAINTAINERCLEANFILES = EXTRA_DIST = TEST_PROGS =
installed_test_LTLIBRARIES = installed_test_PROGRAMS = installed_test_SCRIPTS = nobase_installed_test_DATA =
noinst_LTLIBRARIES = noinst_PROGRAMS = noinst_SCRIPTS = noinst_DATA =
check_LTLIBRARIES = check_PROGRAMS = check_SCRIPTS = check_DATA =
TESTS =
if OS_UNIX test-nonrecursive: ${TEST_PROGS} @test -z "${TEST_PROGS}" || G_TEST_SRCDIR="$(abs_srcdir)" G_TEST_BUILDDIR="$(abs_builddir)" G_DEBUG=gc-friendly MALLOC_CHECK_=2 MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256)) ${GTESTER} --verbose ${TEST_PROGS} else test-nonrecursive: endif
.PHONY: test-nonrecursive
.PHONY: lcov genlcov lcov-clean
lcov: -$(MAKE) $(AM_MAKEFLAGS) -k check $(MAKE) $(AM_MAKEFLAGS) genlcov
genlcov: $(AM_V_GEN) rm -f $(top_builddir)/tests/.libs/libmoduletestplugin_*.gcda; \ $(LTP) --quiet --directory $(top_builddir) --capture --output-file glib-lcov.info --test-name GLIB_PERF --no-checksum --compat-libtool --ignore-errors source; \ $(LTP) --quiet --output-file glib-lcov.info --remove glib-lcov.info docs/reference/* /tmp/* gio/tests/gdbus-object-manager-example/* ; \ LANG=C $(LTP_GENHTML) --quiet --prefix $(top_builddir) --output-directory glib-lcov --title "GLib Code Coverage" --legend --frames --show-details glib-lcov.info --ignore-errors source @echo "file://$(abs_top_builddir)/glib-lcov/index.html"
lcov-clean: if test -n "$(LTP)"; then \ $(LTP) --quiet --directory $(top_builddir) -z; \ fi
check-local: test-nonrecursive
TEST_PROGS += $(strip $(test_programs) $(test_scripts) $(uninstalled_test_programs) $(uninstalled_test_scripts) \ $(dist_test_scripts) $(dist_uninstalled_test_scripts))
if OS_WIN32 TESTS += $(test_programs) $(test_scripts) $(uninstalled_test_programs) $(uninstalled_test_scripts) \ $(dist_test_scripts) $(dist_uninstalled_test_scripts) endif
all_test_programs = $(test_programs) $(uninstalled_test_programs) $(installed_test_programs) \ $(test_extra_programs) $(uninstalled_test_extra_programs) $(installed_test_extra_programs) all_test_scripts = $(test_scripts) $(uninstalled_test_scripts) $(installed_test_scripts) \ $(test_extra_scripts) $(uninstalled_test_extra_scripts) $(installed_test_extra_scripts) all_dist_test_scripts = $(dist_test_scripts) $(dist_uninstalled_test_scripts) $(dist_installed_test_scripts) \ $(dist_test_extra_scripts) $(dist_uninstalled_test_extra_scripts) $(dist_installed_test_extra_scripts) all_test_scripts += $(all_dist_test_scripts) EXTRA_DIST += $(all_dist_test_scripts) all_test_data = $(test_data) $(uninstalled_test_data) $(installed_test_data) all_dist_test_data = $(dist_test_data) $(dist_uninstalled_test_data) $(dist_installed_test_data) all_test_data += $(all_dist_test_data) EXTRA_DIST += $(all_dist_test_data) all_test_ltlibs = $(test_ltlibraries) $(uninstalled_test_ltlibraries) $(installed_test_ltlibraries)
if ENABLE_ALWAYS_BUILD_TESTS noinst_LTLIBRARIES += $(all_test_ltlibs) noinst_PROGRAMS += $(all_test_programs) noinst_SCRIPTS += $(all_test_scripts) noinst_DATA += $(all_test_data) else check_LTLIBRARIES += $(all_test_ltlibs) check_PROGRAMS += $(all_test_programs) check_SCRIPTS += $(all_test_scripts) check_DATA += $(all_test_data) endif
if ENABLE_INSTALLED_TESTS installed_test_PROGRAMS += $(test_programs) $(installed_test_programs) \ $(test_extra_programs) $(installed_test_extra_programs) installed_test_SCRIPTS += $(test_scripts) $(installed_test_scripts) \ $(test_extra_scripts) $(test_installed_extra_scripts) installed_test_SCRIPTS += $(dist_test_scripts) $(dist_test_extra_scripts) \ $(dist_installed_test_scripts) $(dist_installed_test_extra_scripts) nobase_installed_test_DATA += $(test_data) $(installed_test_data) nobase_installed_test_DATA += $(dist_test_data) $(dist_installed_test_data) installed_test_LTLIBRARIES += $(test_ltlibraries) $(installed_test_ltlibraries) installed_testcases = $(test_programs) $(installed_test_programs) \ $(test_scripts) $(installed_test_scripts) \ $(dist_test_scripts) $(dist_installed_test_scripts)
installed_test_meta_DATA = $(installed_testcases:=.test)
%.test: %$(EXEEXT) Makefile $(AM_V_GEN) (echo '[Test]' > $@.tmp; \ echo 'Type=session' >> $@.tmp; \ echo 'Exec=$(installed_testdir)/$(notdir $<)' >> $@.tmp; \ mv $@.tmp $@)
CLEANFILES += $(installed_test_meta_DATA) endif