Don't crash on Games-Howell test when there are small numbers of cases per category.
[pspp-builds.git] / tests / automake.mk
1 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
2
3 check_PROGRAMS += \
4         tests/data/datasheet-test \
5         tests/data/sack \
6         tests/data/inexactify \
7         tests/language/lexer/command-name-test \
8         tests/language/lexer/scan-test \
9         tests/language/lexer/segment-test \
10         tests/libpspp/abt-test \
11         tests/libpspp/bt-test \
12         tests/libpspp/encoding-guesser-test \
13         tests/libpspp/heap-test \
14         tests/libpspp/hmap-test \
15         tests/libpspp/hmapx-test \
16         tests/libpspp/i18n-test \
17         tests/libpspp/ll-test \
18         tests/libpspp/llx-test \
19         tests/libpspp/range-map-test \
20         tests/libpspp/range-set-test \
21         tests/libpspp/sparse-array-test \
22         tests/libpspp/sparse-xarray-test \
23         tests/libpspp/str-test \
24         tests/libpspp/string-map-test \
25         tests/libpspp/stringi-map-test \
26         tests/libpspp/string-set-test \
27         tests/libpspp/stringi-set-test \
28         tests/libpspp/tower-test \
29         tests/libpspp/u8-istream-test \
30         tests/libpspp/zip-test \
31         tests/output/render-test
32
33 check-programs: $(check_PROGRAMS)
34
35 tests_data_datasheet_test_SOURCES = \
36         tests/data/datasheet-test.c
37 tests_data_datasheet_test_LDADD = src/libpspp-core.la
38 tests_data_datasheet_test_CFLAGS = $(AM_CFLAGS)
39
40 tests_data_sack_SOURCES = \
41         tests/data/sack.c
42 tests_data_sack_LDADD = src/libpspp-core.la 
43 tests_data_sack_CFLAGS = $(AM_CFLAGS)
44
45 tests_libpspp_ll_test_SOURCES = \
46         src/libpspp/ll.c \
47         tests/libpspp/ll-test.c
48 tests_libpspp_ll_test_CFLAGS = $(AM_CFLAGS)
49
50 tests_libpspp_llx_test_SOURCES = \
51         src/libpspp/ll.c \
52         src/libpspp/llx.c \
53         tests/libpspp/llx-test.c
54 tests_libpspp_llx_test_CFLAGS = $(AM_CFLAGS)
55
56 tests_libpspp_encoding_guesser_test_SOURCES = \
57         tests/libpspp/encoding-guesser-test.c
58 tests_libpspp_encoding_guesser_test_LDADD = src/libpspp/libpspp.la gl/libgl.la
59
60 tests_libpspp_heap_test_SOURCES = \
61         tests/libpspp/heap-test.c
62 tests_libpspp_heap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
63 tests_libpspp_heap_test_LDADD = src/libpspp/libpspp.la gl/libgl.la
64
65 tests_libpspp_hmap_test_SOURCES = \
66         src/libpspp/hmap.c \
67         tests/libpspp/hmap-test.c
68 tests_libpspp_hmap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
69
70 tests_libpspp_hmapx_test_SOURCES = \
71         src/libpspp/hmap.c \
72         src/libpspp/hmapx.c \
73         tests/libpspp/hmapx-test.c
74 tests_libpspp_hmapx_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
75
76 tests_libpspp_i18n_test_SOURCES = tests/libpspp/i18n-test.c
77 tests_libpspp_i18n_test_LDADD = src/libpspp/libpspp.la gl/libgl.la 
78
79 tests_libpspp_abt_test_SOURCES = \
80         src/libpspp/abt.c \
81         tests/libpspp/abt-test.c
82 tests_libpspp_abt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
83
84 tests_libpspp_bt_test_SOURCES = \
85         src/libpspp/bt.c \
86         tests/libpspp/bt-test.c
87 tests_libpspp_bt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
88
89 tests_libpspp_range_map_test_SOURCES = \
90         src/libpspp/bt.c \
91         src/libpspp/range-map.c \
92         tests/libpspp/range-map-test.c
93 tests_libpspp_range_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
94
95 tests_libpspp_range_set_test_SOURCES = \
96         tests/libpspp/range-set-test.c
97 tests_libpspp_range_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
98 tests_libpspp_range_set_test_LDADD = src/libpspp/libpspp.la gl/libgl.la
99
100 tests_libpspp_str_test_SOURCES = \
101         tests/libpspp/str-test.c
102 tests_libpspp_str_test_LDADD = src/libpspp/libpspp.la gl/libgl.la 
103
104 tests_libpspp_string_map_test_SOURCES = \
105         tests/libpspp/string-map-test.c
106 tests_libpspp_string_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
107 tests_libpspp_string_map_test_LDADD = src/libpspp/libpspp.la gl/libgl.la
108
109 tests_libpspp_stringi_map_test_SOURCES = \
110         tests/libpspp/stringi-map-test.c
111 tests_libpspp_stringi_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
112 tests_libpspp_stringi_map_test_LDADD = src/libpspp/libpspp.la gl/libgl.la
113
114 tests_libpspp_string_set_test_SOURCES = \
115         src/libpspp/hash-functions.c \
116         src/libpspp/hmap.c \
117         src/libpspp/string-set.c \
118         tests/libpspp/string-set-test.c
119 tests_libpspp_string_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
120
121 tests_libpspp_stringi_set_test_SOURCES = \
122         tests/libpspp/stringi-set-test.c
123 tests_libpspp_stringi_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
124 tests_libpspp_stringi_set_test_LDADD = src/libpspp/libpspp.la gl/libgl.la
125
126 tests_libpspp_tower_test_SOURCES = \
127         tests/libpspp/tower-test.c
128 tests_libpspp_tower_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
129 tests_libpspp_tower_test_LDADD = src/libpspp/libpspp.la gl/libgl.la
130
131 tests_libpspp_u8_istream_test_SOURCES = tests/libpspp/u8-istream-test.c
132 tests_libpspp_u8_istream_test_LDADD = src/libpspp/libpspp.la gl/libgl.la
133
134 tests_libpspp_sparse_array_test_SOURCES = \
135         tests/libpspp/sparse-array-test.c 
136 tests_libpspp_sparse_array_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
137 tests_libpspp_sparse_array_test_LDADD = src/libpspp/libpspp.la gl/libgl.la
138
139 tests_libpspp_sparse_xarray_test_SOURCES = \
140         tests/libpspp/sparse-xarray-test.c
141 tests_libpspp_sparse_xarray_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
142 tests_libpspp_sparse_xarray_test_LDADD = src/libpspp/libpspp.la gl/libgl.la
143
144 tests_data_inexactify_SOURCES = tests/data/inexactify.c
145
146 check_PROGRAMS += tests/language/lexer/command-name-test
147 tests_language_lexer_command_name_test_SOURCES = \
148         src/data/identifier.c \
149         src/language/lexer/command-name.c \
150         tests/language/lexer/command-name-test.c
151 tests_language_lexer_command_name_test_LDADD = \
152         src/libpspp/libpspp.la \
153         gl/libgl.la 
154 tests_language_lexer_command_name_test_CFLAGS = $(AM_CFLAGS)
155
156 check_PROGRAMS += tests/language/lexer/scan-test
157 tests_language_lexer_scan_test_SOURCES = \
158         src/data/identifier.c \
159         src/language/lexer/command-name.c \
160         src/language/lexer/scan.c \
161         src/language/lexer/segment.c \
162         src/language/lexer/token.c \
163         tests/language/lexer/scan-test.c
164 tests_language_lexer_scan_test_CFLAGS = $(AM_CFLAGS)
165 tests_language_lexer_scan_test_LDADD = \
166         src/libpspp/libpspp.la \
167         gl/libgl.la 
168
169 check_PROGRAMS += tests/language/lexer/segment-test
170 tests_language_lexer_segment_test_SOURCES = \
171         src/data/identifier.c \
172         src/language/lexer/command-name.c \
173         src/language/lexer/segment.c \
174         tests/language/lexer/segment-test.c
175 tests_language_lexer_segment_test_CFLAGS = $(AM_CFLAGS)
176 tests_language_lexer_segment_test_LDADD = \
177         src/libpspp/libpspp.la \
178         gl/libgl.la 
179
180 check_PROGRAMS += tests/libpspp/zip-test
181 tests_libpspp_zip_test_SOURCES = \
182         tests/libpspp/zip-test.c
183 tests_libpspp_zip_test_CFLAGS = $(AM_CFLAGS)
184 tests_libpspp_zip_test_LDADD = \
185         src/libpspp/libpspp.la \
186         gl/libgl.la 
187
188
189 check_PROGRAMS += tests/output/render-test
190 tests_output_render_test_SOURCES = tests/output/render-test.c
191 tests_output_render_test_LDADD = \
192         src/libpspp.la \
193         src/libpspp-core.la \
194         $(CAIRO_LIBS)
195
196 EXTRA_DIST += \
197         tests/coverage.sh \
198         tests/data/bcd-in.expected.cmp.gz \
199         tests/data/binhex-in.expected.cmp.gz \
200         tests/data/binhex-out.expected.gz \
201         tests/data/legacy-in.expected.cmp.gz \
202         tests/data/num-in.expected.gz \
203         tests/data/num-out-cmp.pl \
204         tests/data/num-out.expected.cmp.gz \
205         tests/data/v13.sav \
206         tests/data/v14.sav \
207         tests/language/data-io/Book1.gnm.unzipped \
208         tests/language/data-io/test.ods
209
210 CLEANFILES += *.save pspp.* foo*
211
212 EXTRA_DIST += tests/OChangeLog
213 \f
214 # Autotest testsuite
215
216 EXTRA_DIST += \
217         tests/testsuite.in \
218         $(TESTSUITE_AT) \
219         $(TESTSUITE) \
220         tests/atlocal.in \
221         $(srcdir)/package.m4 \
222         $(TESTSUITE)
223
224 TESTSUITE_AT = \
225         tests/data/calendar.at \
226         tests/data/data-in.at \
227         tests/data/data-out.at \
228         tests/data/datasheet-test.at \
229         tests/data/format-guesser.at \
230         tests/data/por-file.at \
231         tests/data/sys-file-reader.at \
232         tests/data/sys-file.at \
233         tests/language/command.at \
234         tests/language/control/do-if.at \
235         tests/language/control/do-repeat.at \
236         tests/language/control/loop.at \
237         tests/language/control/temporary.at \
238         tests/language/data-io/add-files.at \
239         tests/language/data-io/data-list.at \
240         tests/language/data-io/data-reader.at \
241         tests/language/data-io/dataset.at \
242         tests/language/data-io/file-handle.at \
243         tests/language/data-io/get-data-spreadsheet.at \
244         tests/language/data-io/get-data-psql.at \
245         tests/language/data-io/get-data-txt.at \
246         tests/language/data-io/get.at \
247         tests/language/data-io/inpt-pgm.at \
248         tests/language/data-io/list.at \
249         tests/language/data-io/match-files.at \
250         tests/language/data-io/print-space.at \
251         tests/language/data-io/print.at \
252         tests/language/data-io/save.at \
253         tests/language/data-io/save-translate.at \
254         tests/language/data-io/update.at \
255         tests/language/dictionary/attributes.at \
256         tests/language/dictionary/formats.at \
257         tests/language/dictionary/missing-values.at \
258         tests/language/dictionary/mrsets.at \
259         tests/language/dictionary/rename-variables.at \
260         tests/language/dictionary/split-file.at \
261         tests/language/dictionary/sys-file-info.at \
262         tests/language/dictionary/value-labels.at \
263         tests/language/dictionary/variable-display.at \
264         tests/language/dictionary/vector.at \
265         tests/language/dictionary/weight.at \
266         tests/language/expressions/evaluate.at \
267         tests/language/expressions/parse.at \
268         tests/language/lexer/command-name.at \
269         tests/language/lexer/lexer.at \
270         tests/language/lexer/q2c.at \
271         tests/language/lexer/scan.at \
272         tests/language/lexer/segment.at \
273         tests/language/lexer/variable-parser.at \
274         tests/language/stats/aggregate.at \
275         tests/language/stats/autorecode.at \
276         tests/language/stats/correlations.at \
277         tests/language/stats/crosstabs.at \
278         tests/language/stats/descriptives.at \
279         tests/language/stats/examine.at \
280         tests/language/stats/factor.at \
281         tests/language/stats/flip.at \
282         tests/language/stats/frequencies.at \
283         tests/language/stats/glm.at \
284         tests/language/stats/means.at \
285         tests/language/stats/npar.at \
286         tests/language/stats/oneway.at \
287         tests/language/stats/quick-cluster.at \
288         tests/language/stats/rank.at \
289         tests/language/stats/regression.at \
290         tests/language/stats/reliability.at \
291         tests/language/stats/roc.at \
292         tests/language/stats/sort-cases.at \
293         tests/language/stats/t-test.at \
294         tests/language/utilities/cache.at \
295         tests/language/utilities/cd.at \
296         tests/language/utilities/date.at \
297         tests/language/utilities/insert.at \
298         tests/language/utilities/permissions.at \
299         tests/language/utilities/set.at \
300         tests/language/utilities/title.at \
301         tests/language/xforms/compute.at \
302         tests/language/xforms/count.at \
303         tests/language/xforms/recode.at \
304         tests/language/xforms/sample.at \
305         tests/language/xforms/select-if.at \
306         tests/libpspp/abt.at \
307         tests/libpspp/bt.at \
308         tests/libpspp/encoding-guesser.at \
309         tests/libpspp/float-format.at \
310         tests/libpspp/heap.at \
311         tests/libpspp/hmap.at \
312         tests/libpspp/hmapx.at \
313         tests/libpspp/i18n.at \
314         tests/libpspp/ll.at \
315         tests/libpspp/llx.at \
316         tests/libpspp/range-map.at \
317         tests/libpspp/range-set.at \
318         tests/libpspp/sparse-array.at \
319         tests/libpspp/sparse-xarray-test.at \
320         tests/libpspp/str.at \
321         tests/libpspp/string-map.at \
322         tests/libpspp/stringi-map.at \
323         tests/libpspp/string-set.at \
324         tests/libpspp/stringi-set.at \
325         tests/libpspp/tower.at \
326         tests/libpspp/u8-istream.at \
327         tests/libpspp/zip.at \
328         tests/math/moments.at \
329         tests/math/randist.at \
330         tests/output/ascii.at \
331         tests/output/charts.at \
332         tests/output/output.at \
333         tests/output/paper-size.at \
334         tests/output/render.at \
335         tests/ui/terminal/main.at \
336         tests/perl-module.at
337
338 TESTSUITE = $(srcdir)/tests/testsuite
339 DISTCLEANFILES += tests/atconfig tests/atlocal $(TESTSUITE)
340 AUTOTEST_PATH = tests/data:tests/language/lexer:tests/libpspp:tests/output:src/ui/terminal
341
342 $(srcdir)/tests/testsuite.at: tests/testsuite.in tests/automake.mk
343         cp $< $@
344         for t in $(TESTSUITE_AT); do \
345           echo "m4_include([$$t])" >> $@ ;\
346         done
347 EXTRA_DIST += tests/testsuite.at
348
349 CHECK_LOCAL += tests_check
350 tests_check: tests/atconfig tests/atlocal $(TESTSUITE) $(check_PROGRAMS)
351         $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS)
352
353 CLEAN_LOCAL += tests_clean
354 tests_clean:
355         test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
356
357 AUTOM4TE = $(SHELL) $(srcdir)/build-aux/missing --run autom4te
358 AUTOTEST = $(AUTOM4TE) --language=autotest
359 $(TESTSUITE): package.m4 $(srcdir)/tests/testsuite.at $(TESTSUITE_AT) 
360         $(AUTOTEST) -I '$(srcdir)' $@.at | sed 's/@<00A0>@/ /g' > $@.tmp
361         mv $@.tmp $@
362
363 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
364 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
365         :;{ \
366           echo '# Signature of the current package.' && \
367           echo 'm4_define([AT_PACKAGE_NAME],      [$(PACKAGE_NAME)])' && \
368           echo 'm4_define([AT_PACKAGE_TARNAME],   [$(PACKAGE_TARNAME)])' && \
369           echo 'm4_define([AT_PACKAGE_VERSION],   [$(PACKAGE_VERSION)])' && \
370           echo 'm4_define([AT_PACKAGE_STRING],    [$(PACKAGE_STRING)])' && \
371           echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])' && \
372           echo 'm4_define([AT_PACKAGE_URL],       [$(PACKAGE_URL)])'; \
373         } >'$(srcdir)/package.m4'
374 \f
375 # valgrind support for Autotest testsuite
376
377 valgrind_wrappers = \
378         tests/valgrind/datasheet-test \
379         tests/valgrind/command-name-test \
380         tests/valgrind/scan-test \
381         tests/valgrind/segment-test \
382         tests/valgrind/abt-test \
383         tests/valgrind/bt-test \
384         tests/valgrind/encoding-guesser-test \
385         tests/valgrind/heap-test \
386         tests/valgrind/hmap-test \
387         tests/valgrind/hmapx-test \
388         tests/valgrind/i18n-test \
389         tests/valgrind/ll-test \
390         tests/valgrind/llx-test \
391         tests/valgrind/range-map-test \
392         tests/valgrind/range-set-test \
393         tests/valgrind/sparse-array-test \
394         tests/valgrind/sparse-xarray-test \
395         tests/valgrind/str-test \
396         tests/valgrind/string-map-test \
397         tests/valgrind/stringi-map-test \
398         tests/valgrind/string-set-test \
399         tests/valgrind/stringi-set-test \
400         tests/valgrind/tower-test \
401         tests/valgrind/u8-istream-test \
402         tests/valgrind/render-test \
403         tests/valgrind/pspp
404
405 $(valgrind_wrappers): tests/valgrind-wrapper.in
406         @test -d tests/valgrind || mkdir tests/valgrind
407         sed -e 's,[@]wrap_program[@],$@,' \
408                 $(top_srcdir)/tests/valgrind-wrapper.in > $@.tmp
409         chmod +x $@.tmp
410         mv $@.tmp $@
411 CLEANFILES += $(valgrind_wrappers)
412 EXTRA_DIST += tests/valgrind-wrapper.in
413
414 VALGRIND = $(SHELL) $(abs_top_builddir)/libtool --mode=execute valgrind --log-file=valgrind.%p --leak-check=full --num-callers=20
415 check-valgrind: all tests/atconfig tests/atlocal $(TESTSUITE) $(valgrind_wrappers)
416         $(SHELL) '$(TESTSUITE)' -C tests VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS)
417         @echo
418         @echo '--------------------------------'
419         @echo 'Valgrind output is in:'
420         @echo 'tests/testsuite.dir/*/valgrind.*'
421         @echo '--------------------------------'