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