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