Added tests for the Kruskal Wallis test
[pspp-builds.git] / tests / automake.mk
1 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
2
3 TESTS_ENVIRONMENT = top_srcdir='$(top_srcdir)' top_builddir='$(top_builddir)'
4 TESTS_ENVIRONMENT += PERL='$(PERL)'
5
6 # Allow locale_charset to find charset.alias before running "make install".
7 TESTS_ENVIRONMENT += CHARSETALIASDIR='$(abs_top_builddir)/gl'
8
9 TESTS_ENVIRONMENT += LC_ALL=C
10 TESTS_ENVIRONMENT += EXEEXT=$(EXEEXT)
11
12 dist_TESTS = \
13         tests/formats/bcd-in.sh \
14         tests/formats/binhex-out.sh \
15         tests/formats/date-in.sh \
16         tests/formats/date-out.sh \
17         tests/formats/float-format.sh \
18         tests/formats/format-guesser.sh \
19         tests/formats/ib-in.sh \
20         tests/formats/legacy-in.sh \
21         tests/formats/month-in.sh \
22         tests/formats/month-out.sh \
23         tests/formats/num-in.sh \
24         tests/formats/num-out.sh \
25         tests/formats/time-in.sh \
26         tests/formats/time-out.sh \
27         tests/formats/wkday-in.sh \
28         tests/formats/wkday-out.sh \
29         tests/formats/360.sh
30
31 TESTS = $(dist_TESTS) $(nodist_TESTS)
32
33 check_PROGRAMS += \
34         $(nodist_TESTS) \
35         tests/data/datasheet-test \
36         tests/formats/inexactify \
37         tests/libpspp/abt-test \
38         tests/libpspp/bt-test \
39         tests/libpspp/heap-test \
40         tests/libpspp/hmap-test \
41         tests/libpspp/hmapx-test \
42         tests/libpspp/i18n-test \
43         tests/libpspp/ll-test \
44         tests/libpspp/llx-test \
45         tests/libpspp/range-map-test \
46         tests/libpspp/range-set-test \
47         tests/libpspp/sparse-array-test \
48         tests/libpspp/sparse-xarray-test \
49         tests/libpspp/str-test \
50         tests/libpspp/string-map-test \
51         tests/libpspp/stringi-map-test \
52         tests/libpspp/string-set-test \
53         tests/libpspp/stringi-set-test \
54         tests/libpspp/tower-test \
55         tests/output/render-test
56
57 tests_data_datasheet_test_SOURCES = \
58         tests/data/datasheet-test.c
59 tests_data_datasheet_test_LDADD = src/libpspp-core.la $(LIBINTL) 
60 tests_data_datasheet_test_CFLAGS = $(AM_CFLAGS)
61
62 tests_libpspp_ll_test_SOURCES = \
63         src/libpspp/ll.c \
64         tests/libpspp/ll-test.c
65 tests_libpspp_ll_test_LDADD = gl/libgl.la $(LIBINTL)
66 tests_libpspp_ll_test_CFLAGS = $(AM_CFLAGS)
67
68 tests_libpspp_llx_test_SOURCES = \
69         src/libpspp/ll.c \
70         src/libpspp/llx.c \
71         tests/libpspp/llx-test.c
72 tests_libpspp_llx_test_LDADD = gl/libgl.la $(LIBINTL)
73 tests_libpspp_llx_test_CFLAGS = $(AM_CFLAGS)
74
75 tests_libpspp_heap_test_SOURCES = \
76         src/libpspp/heap.c \
77         src/libpspp/pool.c \
78         src/libpspp/temp-file.c \
79         tests/libpspp/heap-test.c
80 tests_libpspp_heap_test_LDADD = gl/libgl.la $(LIBINTL) 
81 tests_libpspp_heap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
82
83 tests_libpspp_hmap_test_SOURCES = \
84         src/libpspp/hmap.c \
85         tests/libpspp/hmap-test.c
86 tests_libpspp_hmap_test_LDADD = gl/libgl.la $(LIBINTL)
87 tests_libpspp_hmap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
88
89 tests_libpspp_hmapx_test_SOURCES = \
90         src/libpspp/hmap.c \
91         src/libpspp/hmapx.c \
92         tests/libpspp/hmapx-test.c
93 tests_libpspp_hmapx_test_LDADD = gl/libgl.la $(LIBINTL)
94 tests_libpspp_hmapx_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
95
96 tests_libpspp_i18n_test_SOURCES = tests/libpspp/i18n-test.c
97 tests_libpspp_i18n_test_LDADD = src/libpspp/libpspp.la gl/libgl.la $(LIBINTL) 
98
99 tests_libpspp_abt_test_SOURCES = \
100         src/libpspp/abt.c \
101         tests/libpspp/abt-test.c
102 tests_libpspp_abt_test_LDADD = gl/libgl.la $(LIBINTL)
103 tests_libpspp_abt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
104
105 tests_libpspp_bt_test_SOURCES = \
106         src/libpspp/bt.c \
107         tests/libpspp/bt-test.c
108 tests_libpspp_bt_test_LDADD = gl/libgl.la
109 tests_libpspp_bt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
110
111 tests_libpspp_range_map_test_SOURCES = \
112         src/libpspp/bt.c \
113         src/libpspp/range-map.c \
114         tests/libpspp/range-map-test.c
115 tests_libpspp_range_map_test_LDADD = gl/libgl.la $(LIBINTL)
116 tests_libpspp_range_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
117
118 tests_libpspp_range_set_test_SOURCES = \
119         src/libpspp/bt.c \
120         src/libpspp/pool.c \
121         src/libpspp/range-set.c \
122         src/libpspp/temp-file.c \
123         tests/libpspp/range-set-test.c
124 tests_libpspp_range_set_test_LDADD = gl/libgl.la $(LIBINTL) 
125 tests_libpspp_range_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
126
127 tests_libpspp_str_test_SOURCES = \
128         tests/libpspp/str-test.c
129 tests_libpspp_str_test_LDADD = src/libpspp/libpspp.la gl/libgl.la $(LIBINTL) 
130
131 tests_libpspp_string_map_test_SOURCES = \
132         src/libpspp/hash-functions.c \
133         src/libpspp/hmap.c \
134         src/libpspp/string-map.c \
135         src/libpspp/string-set.c \
136         tests/libpspp/string-map-test.c
137 tests_libpspp_string_map_test_LDADD = gl/libgl.la $(LIBINTL)
138 tests_libpspp_string_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
139
140 tests_libpspp_stringi_map_test_SOURCES = \
141         src/libpspp/hash-functions.c \
142         src/libpspp/hmap.c \
143         src/libpspp/pool.c \
144         src/libpspp/str.c \
145         src/libpspp/stringi-map.c \
146         src/libpspp/string-set.c \
147         src/libpspp/stringi-set.c \
148         src/libpspp/temp-file.c \
149         tests/libpspp/stringi-map-test.c
150 tests_libpspp_stringi_map_test_LDADD = gl/libgl.la $(LIBINTL)
151 tests_libpspp_stringi_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
152
153 tests_libpspp_string_set_test_SOURCES = \
154         src/libpspp/hash-functions.c \
155         src/libpspp/hmap.c \
156         src/libpspp/string-set.c \
157         tests/libpspp/string-set-test.c
158 tests_libpspp_string_set_test_LDADD = gl/libgl.la $(LIBINTL)
159 tests_libpspp_string_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
160
161 tests_libpspp_stringi_set_test_SOURCES = \
162         src/libpspp/hash-functions.c \
163         src/libpspp/hmap.c \
164         src/libpspp/pool.c \
165         src/libpspp/str.c \
166         src/libpspp/stringi-set.c \
167         src/libpspp/temp-file.c \
168         tests/libpspp/stringi-set-test.c
169 tests_libpspp_stringi_set_test_LDADD = gl/libgl.la $(LIBINTL)
170 tests_libpspp_stringi_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
171
172 tests_libpspp_tower_test_SOURCES = \
173         src/libpspp/abt.c \
174         src/libpspp/pool.c \
175         src/libpspp/temp-file.c \
176         src/libpspp/tower.c \
177         tests/libpspp/tower-test.c
178 tests_libpspp_tower_test_LDADD = gl/libgl.la $(LIBINTL) 
179 tests_libpspp_tower_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
180
181 tests_libpspp_sparse_array_test_SOURCES = \
182         src/libpspp/sparse-array.c \
183         src/libpspp/pool.c \
184         tests/libpspp/sparse-array-test.c \
185         src/libpspp/temp-file.c
186 tests_libpspp_sparse_array_test_LDADD = gl/libgl.la $(LIBINTL) 
187 tests_libpspp_sparse_array_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
188
189 tests_libpspp_sparse_xarray_test_SOURCES = \
190         src/libpspp/argv-parser.c \
191         src/libpspp/bt.c \
192         src/libpspp/deque.c \
193         src/libpspp/ext-array.c \
194         src/libpspp/model-checker.c \
195         src/libpspp/range-set.c \
196         src/libpspp/sparse-array.c \
197         src/libpspp/sparse-xarray.c \
198         src/libpspp/str.c \
199         src/libpspp/pool.c \
200         src/libpspp/temp-file.c \
201         tests/libpspp/sparse-xarray-test.c
202 tests_libpspp_sparse_xarray_test_LDADD = gl/libgl.la $(LIBINTL) 
203 tests_libpspp_sparse_xarray_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
204
205 tests_formats_inexactify_SOURCES = tests/formats/inexactify.c
206
207 noinst_PROGRAMS += tests/dissect-sysfile
208 tests_dissect_sysfile_SOURCES = \
209         src/libpspp/integer-format.c \
210         src/libpspp/float-format.c \
211         tests/dissect-sysfile.c
212 tests_dissect_sysfile_LDADD = gl/libgl.la $(LIBINTL) 
213 tests_dissect_sysfile_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
214
215 check_PROGRAMS += tests/output/render-test
216 tests_output_render_test_SOURCES = tests/output/render-test.c
217 tests_output_render_test_LDADD = \
218         src/libpspp.la \
219         src/libpspp-core.la \
220         $(CAIRO_LIBS) \
221         $(LIBICONV) \
222         $(LIBINTL)
223
224 EXTRA_DIST += \
225         $(dist_TESTS) \
226         tests/coverage.sh tests/test_template \
227         tests/data/v13.sav tests/data/v14.sav \
228         tests/formats/bcd-in.expected.cmp.gz \
229         tests/formats/binhex-out.expected.gz \
230         tests/formats/ib-in.expected.cmp.gz \
231         tests/formats/legacy-in.expected.cmp.gz \
232         tests/formats/num-in.expected.gz \
233         tests/formats/num-out.expected.cmp.gz \
234         tests/formats/num-out-cmp.pl \
235         tests/formats/num-out-compare.pl \
236         tests/formats/num-out-decmp.pl \
237         tests/formats/num-out.pl \
238         tests/language/data-io/Book1.gnm.unzipped
239
240 CLEANFILES += *.save pspp.* foo*
241
242 check-for-export-var-val:
243         @if grep -q 'export .*=' $(dist_TESTS) ; then \
244          echo 'One or more tests contain non-portable "export VAR=val" syntax' ; \
245          false ; \
246         fi
247
248 DIST_HOOKS += check-for-export-var-val
249
250 EXTRA_DIST += tests/OChangeLog
251 \f
252 # Autotest testsuite
253
254 EXTRA_DIST += \
255         tests/testsuite.in \
256         $(TESTSUITE_AT) \
257         $(TESTSUITE) \
258         tests/atlocal.in \
259         $(srcdir)/package.m4 \
260         $(TESTSUITE)
261
262 TESTSUITE_AT = \
263         tests/data/calendar.at \
264         tests/data/data-in.at \
265         tests/data/datasheet-test.at \
266         tests/data/por-file.at \
267         tests/data/sys-file.at \
268         tests/language/command.at \
269         tests/language/control/do-if.at \
270         tests/language/control/do-repeat.at \
271         tests/language/control/loop.at \
272         tests/language/control/temporary.at \
273         tests/language/data-io/add-files.at \
274         tests/language/data-io/data-list.at \
275         tests/language/data-io/data-reader.at \
276         tests/language/data-io/file-handle.at \
277         tests/language/data-io/get-data-gnm.at \
278         tests/language/data-io/get-data-psql.at \
279         tests/language/data-io/get-data-txt.at \
280         tests/language/data-io/get.at \
281         tests/language/data-io/inpt-pgm.at \
282         tests/language/data-io/list.at \
283         tests/language/data-io/match-files.at \
284         tests/language/data-io/print.at \
285         tests/language/data-io/save.at \
286         tests/language/data-io/save-translate.at \
287         tests/language/data-io/update.at \
288         tests/language/dictionary/attributes.at \
289         tests/language/dictionary/missing-values.at \
290         tests/language/dictionary/mrsets.at \
291         tests/language/dictionary/rename-variables.at \
292         tests/language/dictionary/split-file.at \
293         tests/language/dictionary/sys-file-info.at \
294         tests/language/dictionary/value-labels.at \
295         tests/language/dictionary/variable-display.at \
296         tests/language/dictionary/vector.at \
297         tests/language/dictionary/weight.at \
298         tests/language/expressions/evaluate.at \
299         tests/language/expressions/parse.at \
300         tests/language/lexer/lexer.at \
301         tests/language/lexer/q2c.at \
302         tests/language/lexer/variable-parser.at \
303         tests/language/stats/aggregate.at \
304         tests/language/stats/autorecode.at \
305         tests/language/stats/correlations.at \
306         tests/language/stats/crosstabs.at \
307         tests/language/stats/descriptives.at \
308         tests/language/stats/examine.at \
309         tests/language/stats/factor.at \
310         tests/language/stats/flip.at \
311         tests/language/stats/frequencies.at \
312         tests/language/stats/npar.at \
313         tests/language/stats/oneway.at \
314         tests/language/stats/rank.at \
315         tests/language/stats/regression.at \
316         tests/language/stats/reliability.at \
317         tests/language/stats/roc.at \
318         tests/language/stats/sort-cases.at \
319         tests/language/stats/t-test.at \
320         tests/language/utilities/date.at \
321         tests/language/utilities/insert.at \
322         tests/language/utilities/permissions.at \
323         tests/language/utilities/set.at \
324         tests/language/utilities/title.at \
325         tests/language/xforms/compute.at \
326         tests/language/xforms/count.at \
327         tests/language/xforms/recode.at \
328         tests/language/xforms/sample.at \
329         tests/language/xforms/select-if.at \
330         tests/libpspp/abt.at \
331         tests/libpspp/bt.at \
332         tests/libpspp/heap.at \
333         tests/libpspp/hmap.at \
334         tests/libpspp/hmapx.at \
335         tests/libpspp/i18n.at \
336         tests/libpspp/ll.at \
337         tests/libpspp/llx.at \
338         tests/libpspp/range-map.at \
339         tests/libpspp/range-set.at \
340         tests/libpspp/sparse-array.at \
341         tests/libpspp/sparse-xarray-test.at \
342         tests/libpspp/str.at \
343         tests/libpspp/string-map.at \
344         tests/libpspp/stringi-map.at \
345         tests/libpspp/string-set.at \
346         tests/libpspp/stringi-set.at \
347         tests/libpspp/tower.at \
348         tests/math/moments.at \
349         tests/math/randist.at \
350         tests/output/charts.at \
351         tests/output/output.at \
352         tests/output/paper-size.at \
353         tests/output/render.at \
354         tests/ui/terminal/main.at \
355         tests/perl-module.at
356
357 TESTSUITE = $(srcdir)/tests/testsuite
358 DISTCLEANFILES += tests/atconfig tests/atlocal $(TESTSUITE)
359
360 $(srcdir)/tests/testsuite.at: tests/testsuite.in tests/automake.mk
361         cp $< $@
362         for t in $(TESTSUITE_AT); do \
363           echo "m4_include([$$t])" >> $@ ;\
364         done
365 EXTRA_DIST += tests/testsuite.at
366
367 CHECK_LOCAL += tests_check
368 tests_check: tests/atconfig tests/atlocal $(TESTSUITE) $(check_PROGRAMS)
369         $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=tests/data:tests/libpspp:tests/output:src/ui/terminal $(TESTSUITEFLAGS)
370
371 CLEAN_LOCAL += tests_clean
372 tests_clean:
373         test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
374
375 AUTOM4TE = $(SHELL) $(srcdir)/build-aux/missing --run autom4te
376 AUTOTEST = $(AUTOM4TE) --language=autotest
377 $(TESTSUITE): package.m4 $(srcdir)/tests/testsuite.at $(TESTSUITE_AT) 
378         $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
379         mv $@.tmp $@
380
381 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
382 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
383         :;{ \
384           echo '# Signature of the current package.' && \
385           echo 'm4_define([AT_PACKAGE_NAME],      [$(PACKAGE_NAME)])' && \
386           echo 'm4_define([AT_PACKAGE_TARNAME],   [$(PACKAGE_TARNAME)])' && \
387           echo 'm4_define([AT_PACKAGE_VERSION],   [$(PACKAGE_VERSION)])' && \
388           echo 'm4_define([AT_PACKAGE_STRING],    [$(PACKAGE_STRING)])' && \
389           echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])' && \
390           echo 'm4_define([AT_PACKAGE_URL],       [$(PACKAGE_URL)])'; \
391         } >'$(srcdir)/package.m4'