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