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