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