Blame tests/Makefile.am

Packit ae235b
include $(top_srcdir)/glib.mk
Packit ae235b
Packit ae235b
SUBDIRS = gobject refcount
Packit ae235b
Packit ae235b
LDADD = $(top_builddir)/glib/libglib-2.0.la
Packit ae235b
AM_CPPFLAGS = $(gmodule_INCLUDES) $(GLIB_DEBUG_FLAGS)
Packit ae235b
DEFS = -DGLIB_DISABLE_DEPRECATION_WARNINGS -DG_LOG_DOMAIN=\"GLib\"
Packit ae235b
AM_CFLAGS = -g
Packit ae235b
Packit ae235b
# Some random programs that appear not to be testcases and not used from any testcases
Packit ae235b
check_PROGRAMS += \
Packit ae235b
	testgdateparser				\
Packit ae235b
	unicode-normalize			\
Packit ae235b
	$(NULL)
Packit ae235b
Packit ae235b
# So far, this is the only gtester-ified testcase here
Packit ae235b
test_programs = \
Packit ae235b
	testglib				\
Packit ae235b
	$(NULL)
Packit ae235b
Packit ae235b
# These are not yet gtester-ified, so mark them as for 'installed' only so we
Packit ae235b
# don't run them under the framework.  We will handle them manually below.
Packit ae235b
installed_test_programs = \
Packit ae235b
	testgdate				\
Packit ae235b
	datetime				\
Packit ae235b
	atomic-test				\
Packit ae235b
	bit-test				\
Packit ae235b
	child-test				\
Packit ae235b
	completion-test				\
Packit ae235b
	dirname-test				\
Packit ae235b
	file-test				\
Packit ae235b
	env-test				\
Packit ae235b
	gio-test				\
Packit ae235b
	mainloop-test				\
Packit ae235b
	mapping-test				\
Packit ae235b
	onceinit				\
Packit ae235b
	asyncqueue-test				\
Packit ae235b
	qsort-test				\
Packit ae235b
	relation-test				\
Packit ae235b
	slice-concurrent			\
Packit ae235b
	slice-threadinit			\
Packit ae235b
	sources					\
Packit ae235b
	thread-test				\
Packit ae235b
	threadpool-test				\
Packit ae235b
	type-test				\
Packit ae235b
	unicode-caseconv			\
Packit ae235b
	unicode-encoding			\
Packit ae235b
	$(NULL)
Packit ae235b
Packit ae235b
test_extra_programs = \
Packit ae235b
	slice-test				\
Packit ae235b
	slice-color				\
Packit ae235b
	assert-msg-test				\
Packit ae235b
	unicode-collate				\
Packit ae235b
	$(NULL)
Packit ae235b
Packit ae235b
if OS_UNIX
Packit ae235b
test_programs += \
Packit ae235b
	spawn-test				\
Packit ae235b
	iochannel-test				\
Packit ae235b
	$(NULL)
Packit ae235b
Packit ae235b
# These don't appear to work installed and we don't want to run them under gtester either...
Packit ae235b
dist_uninstalled_test_extra_scripts = \
Packit ae235b
	run-collate-tests.sh			\
Packit ae235b
	run-assert-msg-test.sh			\
Packit ae235b
	$(NULL)
Packit ae235b
endif
Packit ae235b
Packit ae235b
dist_test_data = \
Packit ae235b
	iochannel-test-infile			\
Packit ae235b
	casemap.txt				\
Packit ae235b
	casefold.txt				\
Packit ae235b
	utf8.txt				\
Packit ae235b
	$(NULL)
Packit ae235b
Packit ae235b
# Run the 'installed' tests manually in-tree.
Packit ae235b
# This will cause them to be built even if installed tests are disabled.
Packit ae235b
check_PROGRAMS += $(installed_test_programs) $(installed_test_extra_programs)
Packit ae235b
check_SCRIPTS += $(installed_test_scripts)
Packit ae235b
TESTS += $(installed_test_programs) $(dist_uninstalled_test_extra_scripts)
Packit ae235b
AM_TESTS_ENVIRONMENT = \
Packit ae235b
	G_TEST_SRCDIR=$(abs_srcdir)				\
Packit ae235b
	G_TEST_BUILDDIR=$(abs_builddir)				\
Packit ae235b
	LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset	\
Packit ae235b
	MALLOC_CHECK_=2						\
Packit ae235b
	MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
Packit ae235b
Packit ae235b
test_programs += module-test
Packit ae235b
module_test_DEPENDENCIES = libmoduletestplugin_a.la libmoduletestplugin_b.la
Packit ae235b
module_test_LDADD = $(top_builddir)/gmodule/libgmodule-2.0.la $(LDADD)
Packit ae235b
module_test_LDFLAGS = $(G_MODULE_LDFLAGS)
Packit ae235b
slice_test_SOURCES = slice-test.c memchunks.c
Packit ae235b
slice_color_SOURCES = slice-color.c memchunks.c
Packit ae235b
slice_threadinit_LDADD = $(top_builddir)/gthread/libgthread-2.0.la $(LDADD)
Packit ae235b
Packit ae235b
test_ltlibraries = libmoduletestplugin_a.la libmoduletestplugin_b.la
Packit ae235b
Packit ae235b
libmoduletestplugin_a_la_SOURCES = libmoduletestplugin_a.c
Packit ae235b
libmoduletestplugin_a_la_LDFLAGS = $(G_MODULE_LDFLAGS) -avoid-version -module $(no_undefined)
Packit ae235b
libmoduletestplugin_a_la_LIBADD = $(G_MODULE_LIBS) ../gmodule/libgmodule-2.0.la ../glib/libglib-2.0.la
Packit ae235b
Packit ae235b
libmoduletestplugin_b_la_SOURCES = libmoduletestplugin_b.c
Packit ae235b
libmoduletestplugin_b_la_LDFLAGS = $(G_MODULE_LDFLAGS) -avoid-version -module $(no_undefined)
Packit ae235b
libmoduletestplugin_b_la_LIBADD = $(G_MODULE_LIBS) ../gmodule/libgmodule-2.0.la ../glib/libglib-2.0.la
Packit ae235b
Packit ae235b
if !ENABLE_INSTALLED_TESTS
Packit ae235b
# see http://lists.gnu.org/archive/html/bug-libtool/2013-05/msg00009.html and gio/tests/Makefile.am
Packit ae235b
libmoduletestplugin_a_la_LDFLAGS += -rpath /
Packit ae235b
libmoduletestplugin_b_la_LDFLAGS += -rpath /
Packit ae235b
endif
Packit ae235b
Packit ae235b
dist-hook: $(BUILT_EXTRA_DIST)
Packit ae235b
	files='$(BUILT_EXTRA_DIST)';				\
Packit ae235b
	for f in $$files; do					\
Packit ae235b
	  if test -f $$f; then d=.; else d=$(srcdir); fi;	\
Packit ae235b
	  cp $$d/$$f $(distdir) || exit 1;			\
Packit ae235b
	done
Packit ae235b
	mkdir $(distdir)/collate;				\
Packit ae235b
	for f in $(srcdir)/collate/* ; do			\
Packit ae235b
	  if test -f $$f; then cp $$f $(distdir)/collate; fi;	\
Packit ae235b
	done
Packit ae235b
Packit ae235b
if HAVE_CXX
Packit ae235b
installed_test_programs += cxx-test
Packit ae235b
cxx_test_SOURCES = cxx-test.C
Packit ae235b
endif
Packit ae235b
Packit ae235b
if ENABLE_TIMELOOP
Packit ae235b
installed_test_programs += timeloop
Packit ae235b
endif
Packit ae235b
Packit ae235b
if PLATFORM_WIN32
Packit ae235b
no_undefined = -no-undefined
Packit ae235b
Packit ae235b
module_test_exp = module-test.exp
Packit ae235b
Packit ae235b
module-test.exp: module-test.o
Packit ae235b
	$(DLLTOOL) --output-exp module-test.exp module-test.o
Packit ae235b
Packit ae235b
installed_test_extra_programs = spawn-test-win32-gui
Packit ae235b
Packit ae235b
spawn_test_win32_gui_LDFLAGS = -mwindows
Packit ae235b
Packit ae235b
endif
Packit ae235b
Packit ae235b
EXTRA_DIST += \
Packit ae235b
	$(test_scripts)				\
Packit ae235b
	gen-casefold-txt.pl			\
Packit ae235b
	gen-casemap-txt.pl			\
Packit ae235b
	iochannel-test-infile			\
Packit ae235b
	timeloop-basic.c			\
Packit ae235b
	assert-msg-test.gdb
Packit ae235b
Packit ae235b
DISTCLEANFILES +=		\
Packit ae235b
	iochannel-test-outfile	\
Packit ae235b
	file-test-get-contents	\
Packit ae235b
	maptest		\
Packit ae235b
	mapchild		\
Packit ae235b
	collate.out