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