Add reference counting types
[glib.git] / glib / tests / Makefile.am
blob7289b419e7e43c659ecc5ade0beadcdf6ceac53e
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         rec-mutex                       \
93         regex                           \
94         rwlock                          \
95         scannerapi                      \
96         search-utils                    \
97         sequence                        \
98         shell                           \
99         slice                           \
100         slist                           \
101         sort                            \
102         spawn-multithreaded             \
103         spawn-singlethread              \
104         strfuncs                        \
105         string                          \
106         testing                         \
107         test-printf                     \
108         thread                          \
109         timeout                         \
110         timer                           \
111         tree                            \
112         utf8-performance                \
113         utf8-pointer                    \
114         utf8-validate                   \
115         utf8-misc                       \
116         utils                           \
117         unicode                         \
118         uri                             \
119         1bit-mutex                      \
120         642026                          \
121         $(NULL)
123 uninstalled_test_programs = \
124         $(NULL)
126 dist_test_data += \
127         bookmarks/fail-01.xbel \
128         bookmarks/fail-02.xbel \
129         bookmarks/fail-03.xbel \
130         bookmarks/fail-04.xbel \
131         bookmarks/fail-05.xbel \
132         bookmarks/fail-06.xbel \
133         bookmarks/fail-07.xbel \
134         bookmarks/fail-08.xbel \
135         bookmarks/fail-09.xbel \
136         bookmarks/fail-10.xbel \
137         bookmarks/fail-11.xbel \
138         bookmarks/fail-12.xbel \
139         bookmarks/fail-13.xbel \
140         bookmarks/fail-14.xbel \
141         bookmarks/fail-15.xbel \
142         bookmarks/fail-16.xbel \
143         bookmarks/fail-17.xbel \
144         bookmarks/valid-01.xbel \
145         bookmarks/valid-02.xbel \
146         bookmarks/valid-03.xbel \
147         $(NULL)
149 markup_tests = \
150         fail-1 fail-2 fail-3 fail-4 fail-5 \
151         fail-6 fail-7 fail-8 fail-9 fail-10 \
152         fail-11 fail-12 fail-13 fail-14 fail-15 \
153         fail-16 fail-17 fail-18 fail-19 fail-20 \
154         fail-21 fail-22 fail-23 fail-24 fail-25 \
155         fail-26 fail-27 fail-28 fail-29 fail-30 \
156         fail-31 fail-32 fail-33 fail-34 fail-35 \
157         fail-36 fail-37 fail-38 fail-39 fail-40 \
158         fail-41 fail-42 fail-43 fail-44 fail-45 \
159         fail-46 fail-47 fail-48 fail-49 \
160         valid-1 valid-2 valid-3 valid-4 valid-5 \
161         valid-6 valid-7 valid-8 valid-9 valid-10 \
162         valid-11 valid-12 valid-13 valid-14 valid-15 \
163         valid-16 \
164         $(NULL)
166 cdata_markup_tests = \
167         valid-8 valid-16 \
168         $(NULL)
170 dist_test_data += $(all_markup_data)
171 all_markup_data = \
172         $(addprefix markups/,$(markup_tests:=.gmarkup) $(markup_tests:=.expected)) \
173         $(addprefix markups/,$(cdata_markup_tests.=.cdata-as-text))
175 # -----------------------------------------------------------------------------
177 test_programs += atomic
178 atomic_CFLAGS  = $(AM_CFLAGS)
179 if HAVE_GCC
180 atomic_CFLAGS += -Wstrict-aliasing=2
181 endif
183 overflow_fallback_SOURCES = overflow.c
184 # FIXME: FLAGS?
185 overflow_fallback_FALGS = $(AM_CFLAGS) -D_GLIB_TEST_OVERFLOW_FALLBACK
187 test_programs += 642026-ec
188 642026_ec_SOURCES = 642026.c
189 642026_ec_CFLAGS = -DG_ERRORCHECK_MUTEXES
191 uninstalled_test_programs += 1bit-emufutex
192 1bit_emufutex_SOURCES  = 1bit-mutex.c
193 1bit_emufutex_CFLAGS = $(AM_CFLAGS) -DTEST_EMULATED_FUTEX
195 uninstalled_test_programs += gwakeup
196 gwakeup_SOURCES = gwakeuptest.c ../../glib/gwakeup.c
198 # -----------------------------------------------------------------------------
200 if OS_UNIX
201 test_programs += \
202         unix                            \
203         include                         \
204         $(NULL)
206 # some testing of gtester functionality
207 XMLLINT = xmllint
208 GTESTER = $(top_builddir)/glib/gtester
210 gtester-xmllint-check: # check testreport xml with xmllint if present
211         ${GTESTER} -k --quiet -o tmpsample.xml --test-arg=--gtester-selftest ${GTESTER}
212         ${XMLLINT} --version 2>/dev/null; test "$$?" != 0 || ${XMLLINT} --noout tmpsample.xml
214 CLEANFILES += tmpsample.xml
216 check-am: gtester-xmllint-check
218 private_LDFLAGS = @G_THREAD_LIBS@
219 thread_LDFLAGS = @G_THREAD_LIBS@
220 endif
222 if HAVE_GCC
223 test_programs += \
224         autoptr                         \
225         $(NULL)
226 endif
228 if OS_WIN32
229 test_programs += gpoll
230 endif
232 # -----------------------------------------------------------------------------
234 if HAVE_EVENTFD
235 uninstalled_test_programs += gwakeup-fallback
236 gwakeup_fallback_SOURCES = gwakeuptest.c ../../glib/gwakeup.c
237 gwakeup_fallback_CFLAGS = $(AM_CFLAGS) -DTEST_EVENTFD_FALLBACK
238 endif
240 # -----------------------------------------------------------------------------
242 EXTRA_DIST += bookmarks.xbel