Fix compilation on Android with the bionic C library
[platform/upstream/glib.git] / glib / tests / Makefile.am
1 include $(top_srcdir)/Makefile.decl
2
3 AM_CPPFLAGS =                           \
4         -g                              \
5         $(glib_INCLUDES)                \
6         -DG_LOG_DOMAIN=\"GLib\"         \
7         -DSRCDIR=\""$(srcdir)"\"        \
8         $(GLIB_DEBUG_FLAGS)
9
10 AM_CFLAGS = $(GLIB_WARN_CFLAGS)
11
12 LDADD = $(top_builddir)/glib/libglib-2.0.la -lm
13
14 TEST_PROGS +=                           \
15         array-test                      \
16         asyncqueue                      \
17         atomic                          \
18         base64                          \
19         bitlock                         \
20         bookmarkfile                    \
21         bytes                           \
22         cache                           \
23         checksum                        \
24         collate                         \
25         cond                            \
26         convert                         \
27         dataset                         \
28         date                            \
29         dir                             \
30         environment                     \
31         error                           \
32         fileutils                       \
33         gdatetime                       \
34         gvariant                        \
35         gwakeup                         \
36         hash                            \
37         hmac                            \
38         hook                            \
39         hostutils                       \
40         keyfile                         \
41         list                            \
42         logging                         \
43         mainloop                        \
44         mappedfile                      \
45         markup-parse                    \
46         markup-collect                  \
47         markup-escape                   \
48         markup-subparser                \
49         mem-overflow                    \
50         mutex                           \
51         node                            \
52         once                            \
53         option-context                  \
54         option-argv0                    \
55         pattern                         \
56         private                         \
57         protocol                        \
58         queue                           \
59         rand                            \
60         rec-mutex                       \
61         regex                           \
62         rwlock                          \
63         scannerapi                      \
64         sequence                        \
65         shell                           \
66         slice                           \
67         slist                           \
68         sort                            \
69         spawn-multithreaded             \
70         spawn-singlethread              \
71         strfuncs                        \
72         string                          \
73         testing                         \
74         test-printf                     \
75         thread                          \
76         timeout                         \
77         tree                            \
78         utf8-performance                \
79         utf8-pointer                    \
80         utf8-validate                   \
81         utf8-misc                       \
82         utils                           \
83         unicode                         \
84         uri                             \
85         1bit-mutex                      \
86         1bit-emufutex                   \
87         642026                          \
88         642026-ec
89
90 noinst_PROGRAMS = $(TEST_PROGS) test-spawn-echo
91
92 atomic_CFLAGS  = $(AM_CFLAGS)
93 if HAVE_GCC
94 atomic_CFLAGS += -Wstrict-aliasing=2
95 endif
96
97 642026_ec_SOURCES = 642026.c
98 642026_ec_CFLAGS = -DG_ERRORCHECK_MUTEXES
99
100 1bit_emufutex_SOURCES  = 1bit-mutex.c
101 1bit_emufutex_CFLAGS = $(AM_CFLAGS) -DTEST_EMULATED_FUTEX
102
103 gwakeup_SOURCES = gwakeuptest.c ../../glib/gwakeup.c
104
105 if HAVE_EVENTFD
106 TEST_PROGS += gwakeup-fallback
107 gwakeup_fallback_SOURCES = gwakeuptest.c ../../glib/gwakeup.c
108 gwakeup_fallback_CFLAGS = $(AM_CFLAGS) -DTEST_EVENTFD_FALLBACK
109 endif
110
111 if OS_UNIX
112
113 TEST_PROGS += unix
114 TEST_PROGS += include
115
116 # some testing of gtester functionality
117 XMLLINT = xmllint
118
119 gtester-xmllint-check: # check testreport xml with xmllint if present
120         ${GTESTER} -k --quiet -o tmpsample.xml --test-arg=--gtester-selftest ${GTESTER}
121         ${XMLLINT} --version 2>/dev/null; test "$$?" != 0 || ${XMLLINT} --noout tmpsample.xml
122
123 check-am: gtester-xmllint-check
124
125 private_LDFLAGS = @G_THREAD_LIBS@
126
127 endif
128
129 CLEANFILES = \
130         tmpsample.xml
131
132 EXTRA_DIST += \
133         4096-random-bytes       \
134         keyfiletest.ini         \
135         pages.ini               \
136         bookmarks.xbel          \
137         empty                   \
138         echo-script
139
140 dist-hook:
141         mkdir $(distdir)/markups;               \
142         for f in $(srcdir)/markups/*; do        \
143           cp $$f $(distdir)/markups; done
144         mkdir $(distdir)/bookmarks;             \
145         for f in $(srcdir)/bookmarks/* ; do     \
146           cp $$f $(distdir)/bookmarks; done