Add refcounted data
[glib.git] / glib / tests / Makefile.am
blob0d524d57f38490c98cf47548e683377ea4ee8aa6
1 include $(top_srcdir)/glib-tap.mk
3 if USE_SYSTEM_PCRE
4 pcre_lib = $(PCRE_LIBS)
5 pcre_inc = $(PCRE_CFLAGS)
6 else
7 pcre_lib = $(top_builddir)/glib/pcre/libpcre.la
8 pcre_inc = -DPCRE_STATIC
9 endif
11 LDADD = $(top_builddir)/glib/libglib-2.0.la -lm
12 AM_CPPFLAGS = -g $(glib_INCLUDES) $(GLIB_DEBUG_FLAGS)
13 DEFS = -DG_LOG_DOMAIN=\"GLib\" -DEXEEXT=\"$(EXEEXT)\"
14 AM_CFLAGS = $(GLIB_WARN_CFLAGS) $(pcre_inc)
16 # The regex test uses pcre_version()
17 regex_LDADD = $(LDADD) $(pcre_lib)
19 # These tests corrupt the gcov bookkeeping, so we
20 # skip them. See bug 682133
21 spawn_singlethread_LDFLAGS = $(patsubst -lgcov,,$(LDFLAGS))
22 spawn_multithreaded_LDFLAGS = $(patsubst -lgcov,,$(LDFLAGS))
24 # -----------------------------------------------------------------------------
26 dist_test_data = \
27         keyfiletest.ini                 \
28         pages.ini                       \
29         keyfile.c                       \
30         empty                           \
31         4096-random-bytes               \
32         $(NULL)
34 dist_test_extra_scripts = \
35         echo-script                     \
36         echo-script.bat                 \
37         $(NULL)
39 test_extra_programs = \
40         test-spawn-echo                 \
41         $(NULL)
43 test_programs = \
44         array-test                      \
45         asyncqueue                      \
46         base64                          \
47         bitlock                         \
48         bookmarkfile                    \
49         bytes                           \
50         cache                           \
51         charset                         \
52         checksum                        \
53         collate                         \
54         cond                            \
55         convert                         \
56         dataset                         \
57         date                            \
58         dir                             \
59         environment                     \
60         error                           \
61         fileutils                       \
62         gdatetime                       \
63         guuid                           \
64         gvariant                        \
65         hash                            \
66         hmac                            \
67         hook                            \
68         hostutils                       \
69         keyfile                         \
70         list                            \
71         logging                         \
72         mainloop                        \
73         mappedfile                      \
74         markup                          \
75         markup-parse                    \
76         markup-collect                  \
77         markup-escape                   \
78         markup-subparser                \
79         mem-overflow                    \
80         mutex                           \
81         node                            \
82         once                            \
83         option-context                  \
84         option-argv0                    \
85         overflow                        \
86         overflow-fallback               \
87         pattern                         \
88         private                         \
89         protocol                        \
90         queue                           \
91         rand                            \
92         rcbox                           \
93         rec-mutex                       \
94         regex                           \
95         rwlock                          \
96         scannerapi                      \
97         search-utils                    \
98         sequence                        \
99         shell                           \
100         slice                           \
101         slist                           \
102         sort                            \
103         spawn-multithreaded             \
104         spawn-singlethread              \
105         strfuncs                        \
106         string                          \
107         testing                         \
108         test-printf                     \
109         thread                          \
110         timeout                         \
111         timer                           \
112         tree                            \
113         utf8-performance                \
114         utf8-pointer                    \
115         utf8-validate                   \
116         utf8-misc                       \
117         utils                           \
118         unicode                         \
119         uri                             \
120         1bit-mutex                      \
121         642026                          \
122         $(NULL)
124 uninstalled_test_programs = \
125         $(NULL)
127 dist_test_data += \
128         bookmarks/fail-01.xbel \
129         bookmarks/fail-02.xbel \
130         bookmarks/fail-03.xbel \
131         bookmarks/fail-04.xbel \
132         bookmarks/fail-05.xbel \
133         bookmarks/fail-06.xbel \
134         bookmarks/fail-07.xbel \
135         bookmarks/fail-08.xbel \
136         bookmarks/fail-09.xbel \
137         bookmarks/fail-10.xbel \
138         bookmarks/fail-11.xbel \
139         bookmarks/fail-12.xbel \
140         bookmarks/fail-13.xbel \
141         bookmarks/fail-14.xbel \
142         bookmarks/fail-15.xbel \
143         bookmarks/fail-16.xbel \
144         bookmarks/fail-17.xbel \
145         bookmarks/valid-01.xbel \
146         bookmarks/valid-02.xbel \
147         bookmarks/valid-03.xbel \
148         $(NULL)
150 markup_tests = \
151         fail-1 fail-2 fail-3 fail-4 fail-5 \
152         fail-6 fail-7 fail-8 fail-9 fail-10 \
153         fail-11 fail-12 fail-13 fail-14 fail-15 \
154         fail-16 fail-17 fail-18 fail-19 fail-20 \
155         fail-21 fail-22 fail-23 fail-24 fail-25 \
156         fail-26 fail-27 fail-28 fail-29 fail-30 \
157         fail-31 fail-32 fail-33 fail-34 fail-35 \
158         fail-36 fail-37 fail-38 fail-39 fail-40 \
159         fail-41 fail-42 fail-43 fail-44 fail-45 \
160         fail-46 fail-47 fail-48 fail-49 \
161         valid-1 valid-2 valid-3 valid-4 valid-5 \
162         valid-6 valid-7 valid-8 valid-9 valid-10 \
163         valid-11 valid-12 valid-13 valid-14 valid-15 \
164         valid-16 \
165         $(NULL)
167 cdata_markup_tests = \
168         valid-8 valid-16 \
169         $(NULL)
171 dist_test_data += $(all_markup_data)
172 all_markup_data = \
173         $(addprefix markups/,$(markup_tests:=.gmarkup) $(markup_tests:=.expected)) \
174         $(addprefix markups/,$(cdata_markup_tests.=.cdata-as-text))
176 # -----------------------------------------------------------------------------
178 test_programs += atomic
179 atomic_CFLAGS  = $(AM_CFLAGS)
180 if HAVE_GCC
181 atomic_CFLAGS += -Wstrict-aliasing=2
182 endif
184 overflow_fallback_SOURCES = overflow.c
185 # FIXME: FLAGS?
186 overflow_fallback_FALGS = $(AM_CFLAGS) -D_GLIB_TEST_OVERFLOW_FALLBACK
188 test_programs += 642026-ec
189 642026_ec_SOURCES = 642026.c
190 642026_ec_CFLAGS = -DG_ERRORCHECK_MUTEXES
192 uninstalled_test_programs += 1bit-emufutex
193 1bit_emufutex_SOURCES  = 1bit-mutex.c
194 1bit_emufutex_CFLAGS = $(AM_CFLAGS) -DTEST_EMULATED_FUTEX
196 uninstalled_test_programs += gwakeup
197 gwakeup_SOURCES = gwakeuptest.c ../../glib/gwakeup.c
199 # -----------------------------------------------------------------------------
201 if OS_UNIX
202 test_programs += \
203         unix                            \
204         include                         \
205         $(NULL)
207 # some testing of gtester functionality
208 XMLLINT = xmllint
209 GTESTER = $(top_builddir)/glib/gtester
211 gtester-xmllint-check: # check testreport xml with xmllint if present
212         ${GTESTER} -k --quiet -o tmpsample.xml --test-arg=--gtester-selftest ${GTESTER}
213         ${XMLLINT} --version 2>/dev/null; test "$$?" != 0 || ${XMLLINT} --noout tmpsample.xml
215 CLEANFILES += tmpsample.xml
217 check-am: gtester-xmllint-check
219 private_LDFLAGS = @G_THREAD_LIBS@
220 thread_LDFLAGS = @G_THREAD_LIBS@
221 endif
223 if HAVE_GCC
224 test_programs += \
225         autoptr                         \
226         $(NULL)
227 endif
229 if OS_WIN32
230 test_programs += gpoll
231 endif
233 # -----------------------------------------------------------------------------
235 if HAVE_EVENTFD
236 uninstalled_test_programs += gwakeup-fallback
237 gwakeup_fallback_SOURCES = gwakeuptest.c ../../glib/gwakeup.c
238 gwakeup_fallback_CFLAGS = $(AM_CFLAGS) -DTEST_EVENTFD_FALLBACK
239 endif
241 # -----------------------------------------------------------------------------
243 EXTRA_DIST += bookmarks.xbel