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