Home | History | Annotate | Download | only in tests
      1 include $(top_srcdir)/Makefile.decl
      2 
      3 SUBDIRS=gobject refcount
      4 
      5 if ENABLE_REGEX
      6 enable_regex = -DENABLE_REGEX
      7 else
      8 enable_regex =
      9 endif
     10 
     11 AM_CPPFLAGS = 				\
     12 	-I$(top_srcdir) 		\
     13 	-I$(top_srcdir)/glib 		\
     14 	-I$(top_srcdir)/gmodule 	\
     15 	$(GLIB_DEBUG_FLAGS) 		\
     16 	$(enable_regex)
     17 
     18 AM_CFLAGS = -g
     19 
     20 EFENCE=
     21 
     22 libglib = $(top_builddir)/glib/libglib-2.0.la
     23 libgthread = $(top_builddir)/gthread/libgthread-2.0.la
     24 libgmodule = $(top_builddir)/gmodule/libgmodule-2.0.la
     25 libgobject = $(top_builddir)/gobject/libgobject-2.0.la
     26 
     27 libadd_libgmodule = $(libgmodule)
     28 libadd_libglib = $(libglib)
     29 if PLATFORM_WIN32
     30 no_undefined = -no-undefined
     31 
     32 module_test_exp = module-test.exp
     33 
     34 module-test.exp: module-test.o
     35 	dlltool --output-exp module-test.exp module-test.o
     36 
     37 spawn_test_win32_gui = spawn-test-win32-gui
     38 
     39 spawn_test_win32_gui_LDFLAGS = -mwindows
     40 
     41 endif
     42 
     43 EXTRA_DIST +=					\
     44 	$(test_scripts)				\
     45 	makefile.msc.in				\
     46 	casefold.txt				\
     47 	casemap.txt				\
     48 	gen-casefold-txt.pl			\
     49 	gen-casemap-txt.pl			\
     50 	iochannel-test-infile			\
     51 	utf8.txt				\
     52 	timeloop-basic.c		
     53 
     54 BUILT_EXTRA_DIST =				\
     55 	makefile.msc
     56 
     57 if HAVE_CXX
     58 CXX_TEST = cxx-test
     59 cxx_test_LDADD = $(progs_ldadd)
     60 cxx_test_SOURCES = cxx-test.C
     61 else
     62 CXX_TEST =
     63 endif
     64 
     65 if ENABLE_TIMELOOP
     66 timeloop = timeloop timeloop-closure
     67 endif
     68 noinst_PROGRAMS = $(TEST_PROGS)	\
     69 	testgdate 		\
     70 	testgdateparser 	\
     71 	unicode-normalize 	\
     72 	unicode-collate 	\
     73 	$(timeloop) 		\
     74 	errorcheck-mutex-test
     75 
     76 TEST_PROGS              += scannerapi
     77 scannerapi_SOURCES       = scannerapi.c
     78 scannerapi_LDADD         = $(progs_ldadd)
     79 TEST_PROGS		+= testglib
     80 testglib_SOURCES         = testglib.c
     81 testglib_LDADD		 = $(libglib)
     82 TEST_PROGS              += testingbase64
     83 testingbase64_SOURCES    = testingbase64.c
     84 testingbase64_LDADD      = $(progs_ldadd)
     85 
     86 
     87 patterntest_LDADD = $(libglib)
     88 testgdate_LDADD = $(libglib)
     89 testgdateparser_LDADD = $(libglib)
     90 unicode_normalize_LDADD = $(libglib)
     91 errorcheck_mutex_test_LDADD = $(libglib) $(libgthread) $(G_THREAD_LIBS) 
     92 if ENABLE_TIMELOOP
     93 timeloop_LDADD = $(libglib)
     94 timeloop_closure_LDADD = $(libglib) $(libgobject)
     95 endif
     96 
     97 test_programs =					\
     98 	atomic-test				\
     99 	base64-test				\
    100 	bit-test				\
    101 	$(CXX_TEST)				\
    102 	checksum-test				\
    103 	child-test				\
    104 	completion-test				\
    105 	convert-test				\
    106 	date-test				\
    107 	dirname-test				\
    108 	file-test				\
    109 	env-test				\
    110 	gio-test				\
    111 	hash-test				\
    112 	iochannel-test				\
    113 	list-test				\
    114 	mainloop-test				\
    115 	mapping-test				\
    116 	markup-collect				\
    117 	markup-escape-test			\
    118 	module-test				\
    119 	node-test				\
    120 	onceinit				\
    121 	patterntest				\
    122 	queue-test				\
    123 	asyncqueue-test				\
    124 	qsort-test				\
    125 	relation-test				\
    126 	sequence-test				\
    127 	shell-test				\
    128 	slist-test				\
    129 	slice-test				\
    130 	slice-color				\
    131 	slice-concurrent			\
    132 	slice-threadinit			\
    133 	spawn-test				\
    134 	$(spawn_test_win32_gui)			\
    135 	thread-test				\
    136 	threadpool-test				\
    137 	tree-test				\
    138 	type-test				\
    139 	unicode-caseconv			\
    140 	unicode-encoding			\
    141 	utf8-validate				\
    142 	utf8-pointer				\
    143 	uri-test				\
    144 	regex-test
    145 
    146 test_scripts = run-markup-tests.sh run-collate-tests.sh run-bookmark-test.sh
    147 
    148 test_script_support_programs = markup-test unicode-collate bookmarkfile-test
    149 
    150 check_PROGRAMS = $(test_programs) $(test_script_support_programs)
    151 
    152 TESTS = $(test_programs) $(test_scripts)
    153 TESTS_ENVIRONMENT = srcdir=$(srcdir) \
    154 	LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset \
    155 	MALLOC_CHECK_=2	\
    156         MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
    157 
    158 progs_ldadd = $(EFENCE) $(libglib) $(EFENCE)
    159 thread_ldadd = $(libgthread) $(G_THREAD_LIBS) $(progs_ldadd)
    160 module_ldadd = $(libgmodule) $(G_MODULE_LIBS) $(progs_ldadd)
    161 
    162 atomic_test_LDADD = $(progs_ldadd)
    163 base64_test_LDADD = $(progs_ldadd)
    164 bit_test_LDADD = $(progs_ldadd)
    165 bookmarkfile_test_LDADD = $(progs_ldadd)
    166 checksum_test_LDADD = $(progs_ldadd)
    167 child_test_LDADD = $(thread_ldadd)
    168 completion_test_LDADD = $(progs_ldadd)
    169 convert_test_LDADD = $(progs_ldadd)
    170 date_test_LDADD = $(progs_ldadd)
    171 dirname_test_LDADD = $(progs_ldadd)
    172 file_test_LDADD = $(progs_ldadd)
    173 env_test_LDADD = $(progs_ldadd)
    174 gio_test_LDADD = $(progs_ldadd)
    175 hash_test_LDADD = $(progs_ldadd)
    176 iochannel_test_LDADD = $(progs_ldadd)
    177 list_test_LDADD = $(progs_ldadd)
    178 mainloop_test_LDADD = $(thread_ldadd)
    179 markup_test_LDADD = $(progs_ldadd)
    180 mapping_test_LDADD = $(progs_ldadd)
    181 markup_escape_test_LDADD = $(progs_ldadd)
    182 module_test_LDADD = $(module_ldadd) $(module_test_exp)
    183 module_test_LDFLAGS = $(G_MODULE_LDFLAGS)
    184 node_test_LDADD = $(progs_ldadd)
    185 onceinit_LDADD = $(thread_ldadd)
    186 queue_test_LDADD = $(progs_ldadd)
    187 asyncqueue_test_LDADD = $(thread_ldadd)
    188 qsort_test_LDADD = $(progs_ldadd)
    189 relation_test_LDADD = $(progs_ldadd)
    190 sequence_test_LDADD = $(progs_ldadd)
    191 shell_test_LDADD = $(progs_ldadd)
    192 slist_test_LDADD = $(progs_ldadd)
    193 slice_test_SOURCES = slice-test.c memchunks.c
    194 slice_test_LDADD = $(thread_ldadd)
    195 slice_color_SOURCES = slice-color.c memchunks.c
    196 slice_color_LDADD = $(thread_ldadd)
    197 slice_concurrent_SOURCES = slice-concurrent.c
    198 slice_concurrent_LDADD = $(thread_ldadd)
    199 slice_threadinit_SOURCES = slice-threadinit.c
    200 slice_threadinit_LDADD = $(thread_ldadd)
    201 spawn_test_LDADD = $(progs_ldadd)
    202 thread_test_LDADD = $(thread_ldadd)
    203 threadpool_test_LDADD = $(thread_ldadd)
    204 tree_test_LDADD = $(progs_ldadd)
    205 type_test_LDADD = $(progs_ldadd)
    206 unicode_encoding_LDADD = $(progs_ldadd)
    207 unicode_caseconv_LDADD = $(progs_ldadd)
    208 unicode_collate_LDADD = $(progs_ldadd)
    209 utf8_validate_LDADD = $(progs_ldadd)
    210 utf8_pointer_LDADD = $(progs_ldadd)
    211 uri_test_LDADD = $(progs_ldadd)
    212 regex_test_LDADD = $(progs_ldadd)
    213 markup_collect_LDADD = $(progs_ldadd)
    214 
    215 noinst_LTLIBRARIES = libmoduletestplugin_a.la libmoduletestplugin_b.la
    216 
    217 libmoduletestplugin_a_la_SOURCES = libmoduletestplugin_a.c
    218 libmoduletestplugin_a_la_LDFLAGS = $(G_MODULE_LDFLAGS) -avoid-version -module $(no_undefined) -rpath $(libdir)
    219 libmoduletestplugin_a_la_LIBADD = $(G_MODULE_LIBS) $(libadd_libgmodule) $(libadd_libglib)
    220 
    221 libmoduletestplugin_b_la_SOURCES = libmoduletestplugin_b.c
    222 libmoduletestplugin_b_la_LDFLAGS = $(G_MODULE_LDFLAGS) -avoid-version -module $(no_undefined) -rpath $(libdir)
    223 libmoduletestplugin_b_la_LIBADD = $(G_MODULE_LIBS) $(libadd_libgmodule) $(libadd_libglib)
    224 
    225 dist-hook: $(BUILT_EXTRA_DIST)
    226 	files='$(BUILT_EXTRA_DIST)'; 				\
    227 	for f in $$files; do 					\
    228 	  if test -f $$f; then d=.; else d=$(srcdir); fi; 	\
    229 	  cp $$d/$$f $(distdir) || exit 1; done
    230 	mkdir $(distdir)/markups;          			\
    231 	for f in $(srcdir)/markups/* ; do  			\
    232 	  cp $$f $(distdir)/markups; done 
    233 	mkdir $(distdir)/collate;          			\
    234 	for f in $(srcdir)/collate/* ; do  			\
    235           if test -f $$f; then cp $$f $(distdir)/collate; fi; done
    236 	mkdir $(distdir)/bookmarks;          			\
    237 	for f in $(srcdir)/bookmarks/* ; do  			\
    238 	  cp $$f $(distdir)/bookmarks; done 
    239 
    240 DISTCLEANFILES =		\
    241 	iochannel-test-outfile 	\
    242 	file-test-get-contents 	\
    243 	maptest 		\
    244 	mapchild 		\
    245 	collate.out
    246