tests: Remove unnecessary mention of header files from automake.mk.
[pspp] / 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)' PG_CONFIG='$(PG_CONFIG)'
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/command/bignum.sh \
14         tests/command/correlation.sh \
15         tests/command/do-if.sh \
16         tests/command/do-repeat.sh \
17         tests/command/erase.sh \
18         tests/command/examine.sh \
19         tests/command/examine-extremes.sh \
20         tests/command/examine-percentiles.sh \
21         tests/command/file-label.sh \
22         tests/command/file-handle.sh \
23         tests/command/filter.sh \
24         tests/command/get-data-txt.sh \
25         tests/command/get-data-txt-examples.sh \
26         tests/command/get-data-txt-importcases.sh \
27         tests/command/import-export.sh \
28         tests/command/insert.sh \
29         tests/command/lag.sh \
30         tests/command/line-ends.sh \
31         tests/command/list.sh \
32         tests/command/loop.sh \
33         tests/command/longvars.sh \
34         tests/command/match-files.sh \
35         tests/command/missing-values.sh \
36         tests/command/no_case_size.sh \
37         tests/command/n_of_cases.sh \
38         tests/command/npar-binomial.sh \
39         tests/command/npar-chisquare.sh \
40         tests/command/npar-wilcoxon.sh \
41         tests/command/npar-sign.sh \
42         tests/command/permissions.sh \
43         tests/command/print.sh \
44         tests/command/print-strings.sh \
45         tests/command/rank.sh \
46         tests/command/rename.sh \
47         tests/command/regression.sh \
48         tests/command/regression-qr.sh \
49         tests/command/reliability.sh \
50         tests/command/roc.sh \
51         tests/command/roc2.sh \
52         tests/command/sample.sh \
53         tests/command/sort.sh \
54         tests/command/sysfiles.sh \
55         tests/command/sysfiles-old.sh \
56         tests/command/sysfile-info.sh \
57         tests/command/split-file.sh \
58         tests/command/t-test-1-indep-val.sh \
59         tests/command/t-test-1-sample-missing-anal.sh \
60         tests/command/t-test-1-sample-missing-list.sh \
61         tests/command/t-test-1s.sh \
62         tests/command/t-test-groups.sh \
63         tests/command/t-test-indep-missing-anal.sh \
64         tests/command/t-test-indep-missing-list.sh \
65         tests/command/t-test-paired-missing-anal.sh \
66         tests/command/t-test-paired-missing-list.sh \
67         tests/command/t-test-pairs.sh \
68         tests/command/trimmed-mean.sh \
69         tests/command/tabs.sh \
70         tests/command/update.sh \
71         tests/command/use.sh \
72         tests/command/variable-display.sh \
73         tests/command/vector.sh \
74         tests/command/very-long-strings.sh \
75         tests/command/weight.sh \
76         tests/formats/bcd-in.sh \
77         tests/formats/binhex-out.sh \
78         tests/formats/date-in.sh \
79         tests/formats/date-out.sh \
80         tests/formats/float-format.sh \
81         tests/formats/format-guesser.sh \
82         tests/formats/ib-in.sh \
83         tests/formats/legacy-in.sh \
84         tests/formats/month-in.sh \
85         tests/formats/month-out.sh \
86         tests/formats/num-in.sh \
87         tests/formats/num-out.sh \
88         tests/formats/time-in.sh \
89         tests/formats/time-out.sh \
90         tests/formats/wkday-in.sh \
91         tests/formats/wkday-out.sh \
92         tests/formats/360.sh \
93         tests/bugs/big-input.sh \
94         tests/bugs/big-input-2.sh \
95         tests/bugs/case-map.sh \
96         tests/bugs/comment-at-eof.sh \
97         tests/bugs/compression.sh \
98         tests/bugs/curtailed.sh \
99         tests/bugs/data-crash.sh \
100         tests/bugs/empty-do-repeat.sh \
101         tests/bugs/get.sh \
102         tests/bugs/examine-crash.sh \
103         tests/bugs/examine-crash2.sh \
104         tests/bugs/examine-crash3.sh \
105         tests/bugs/examine-1sample.sh \
106         tests/bugs/examine-missing.sh \
107         tests/bugs/examine-missing2.sh \
108         tests/bugs/get-no-file.sh \
109         tests/bugs/if_crash.sh \
110         tests/bugs/input-crash.sh \
111         tests/bugs/lag_crash.sh \
112         tests/bugs/list-overflow.sh \
113         tests/bugs/match-files-scratch.sh \
114         tests/bugs/multipass.sh \
115         tests/bugs/overwrite-input-file.sh \
116         tests/bugs/overwrite-special-file.sh \
117         tests/bugs/random.sh \
118         tests/bugs/shbang.sh \
119         tests/bugs/signals.sh \
120         tests/bugs/t-test-with-temp.sh \
121         tests/bugs/t-test.sh \
122         tests/bugs/t-test-alpha.sh \
123         tests/bugs/t-test-alpha2.sh \
124         tests/bugs/t-test-alpha3.sh \
125         tests/bugs/t-test-paired.sh \
126         tests/bugs/temporary.sh \
127         tests/bugs/unwritable-dir.sh \
128         tests/bugs/val-labs.sh \
129         tests/bugs/val-labs-trailing-slash.sh \
130         tests/bugs/print-crash.sh \
131         tests/bugs/keep-all.sh \
132         tests/data/datasheet-test.sh \
133         tests/libpspp/sparse-xarray-test.sh \
134         tests/output/paper-size.sh \
135         tests/expressions/randist.sh \
136         tests/expressions/valuelabel.sh \
137         tests/expressions/variables.sh \
138         tests/expressions/vectors.sh
139
140 if GNM_SUPPORT
141 dist_TESTS += tests/command/get-data-gnm.sh 
142 endif
143
144 if PSQL_SUPPORT
145 dist_TESTS += tests/command/get-data-psql.sh 
146 endif
147
148 nodist_TESTS = \
149         tests/libpspp/abt-test \
150         tests/libpspp/bt-test \
151         tests/libpspp/heap-test \
152         tests/libpspp/hmap-test \
153         tests/libpspp/hmapx-test \
154         tests/libpspp/ll-test \
155         tests/libpspp/llx-test \
156         tests/libpspp/range-map-test \
157         tests/libpspp/range-set-test \
158         tests/libpspp/sparse-array-test \
159         tests/libpspp/str-test \
160         tests/libpspp/string-map-test \
161         tests/libpspp/stringi-map-test \
162         tests/libpspp/string-set-test \
163         tests/libpspp/stringi-set-test \
164         tests/libpspp/tower-test
165
166 TESTS = $(dist_TESTS) $(nodist_TESTS)
167
168 check_PROGRAMS += \
169         $(nodist_TESTS) \
170         tests/data/datasheet-test \
171         tests/formats/inexactify \
172         tests/libpspp/i18n-test \
173         tests/libpspp/sparse-xarray-test \
174         tests/output/render-test
175
176 tests_data_datasheet_test_SOURCES = \
177         tests/data/datasheet-test.c
178 tests_data_datasheet_test_LDADD = src/libpspp-core.la $(LIBINTL) 
179 tests_data_datasheet_test_CFLAGS = $(AM_CFLAGS)
180
181 tests_libpspp_ll_test_SOURCES = \
182         src/libpspp/ll.c \
183         tests/libpspp/ll-test.c
184 tests_libpspp_ll_test_LDADD = gl/libgl.la $(LIBINTL)
185 tests_libpspp_ll_test_CFLAGS = $(AM_CFLAGS)
186
187 tests_libpspp_llx_test_SOURCES = \
188         src/libpspp/ll.c \
189         src/libpspp/llx.c \
190         tests/libpspp/llx-test.c
191 tests_libpspp_llx_test_LDADD = gl/libgl.la $(LIBINTL)
192 tests_libpspp_llx_test_CFLAGS = $(AM_CFLAGS)
193
194 tests_libpspp_heap_test_SOURCES = \
195         src/libpspp/heap.c \
196         src/libpspp/pool.c \
197         src/libpspp/temp-file.c \
198         tests/libpspp/heap-test.c
199 tests_libpspp_heap_test_LDADD = gl/libgl.la $(LIBINTL) 
200 tests_libpspp_heap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
201
202 tests_libpspp_hmap_test_SOURCES = \
203         src/libpspp/hmap.c \
204         tests/libpspp/hmap-test.c
205 tests_libpspp_hmap_test_LDADD = gl/libgl.la $(LIBINTL)
206 tests_libpspp_hmap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
207
208 tests_libpspp_hmapx_test_SOURCES = \
209         src/libpspp/hmap.c \
210         src/libpspp/hmapx.c \
211         tests/libpspp/hmapx-test.c
212 tests_libpspp_hmapx_test_LDADD = gl/libgl.la $(LIBINTL)
213 tests_libpspp_hmapx_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
214
215 tests_libpspp_i18n_test_SOURCES = tests/libpspp/i18n-test.c
216 tests_libpspp_i18n_test_LDADD = src/libpspp/libpspp.la gl/libgl.la $(LIBINTL) 
217
218 tests_libpspp_abt_test_SOURCES = \
219         src/libpspp/abt.c \
220         tests/libpspp/abt-test.c
221 tests_libpspp_abt_test_LDADD = gl/libgl.la $(LIBINTL)
222 tests_libpspp_abt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
223
224 tests_libpspp_bt_test_SOURCES = \
225         src/libpspp/bt.c \
226         tests/libpspp/bt-test.c
227 tests_libpspp_bt_test_LDADD = gl/libgl.la
228 tests_libpspp_bt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
229
230 tests_libpspp_range_map_test_SOURCES = \
231         src/libpspp/bt.c \
232         src/libpspp/range-map.c \
233         tests/libpspp/range-map-test.c
234 tests_libpspp_range_map_test_LDADD = gl/libgl.la $(LIBINTL)
235 tests_libpspp_range_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
236
237 tests_libpspp_range_set_test_SOURCES = \
238         src/libpspp/bt.c \
239         src/libpspp/pool.c \
240         src/libpspp/range-set.c \
241         src/libpspp/temp-file.c \
242         tests/libpspp/range-set-test.c
243 tests_libpspp_range_set_test_LDADD = gl/libgl.la $(LIBINTL) 
244 tests_libpspp_range_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
245
246 tests_libpspp_str_test_SOURCES = \
247         tests/libpspp/str-test.c
248 tests_libpspp_str_test_LDADD = src/libpspp/libpspp.la gl/libgl.la $(LIBINTL) 
249
250 tests_libpspp_string_map_test_SOURCES = \
251         src/libpspp/hash-functions.c \
252         src/libpspp/hmap.c \
253         src/libpspp/string-map.c \
254         src/libpspp/string-set.c \
255         tests/libpspp/string-map-test.c
256 tests_libpspp_string_map_test_LDADD = gl/libgl.la $(LIBINTL)
257 tests_libpspp_string_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
258
259 tests_libpspp_stringi_map_test_SOURCES = \
260         src/libpspp/hash-functions.c \
261         src/libpspp/hmap.c \
262         src/libpspp/pool.c \
263         src/libpspp/str.c \
264         src/libpspp/stringi-map.c \
265         src/libpspp/string-set.c \
266         src/libpspp/stringi-set.c \
267         src/libpspp/temp-file.c \
268         tests/libpspp/stringi-map-test.c
269 tests_libpspp_stringi_map_test_LDADD = gl/libgl.la $(LIBINTL)
270 tests_libpspp_stringi_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
271
272 tests_libpspp_string_set_test_SOURCES = \
273         src/libpspp/hash-functions.c \
274         src/libpspp/hmap.c \
275         src/libpspp/string-set.c \
276         tests/libpspp/string-set-test.c
277 tests_libpspp_string_set_test_LDADD = gl/libgl.la $(LIBINTL)
278 tests_libpspp_string_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
279
280 tests_libpspp_stringi_set_test_SOURCES = \
281         src/libpspp/hash-functions.c \
282         src/libpspp/hmap.c \
283         src/libpspp/pool.c \
284         src/libpspp/str.c \
285         src/libpspp/stringi-set.c \
286         src/libpspp/temp-file.c \
287         tests/libpspp/stringi-set-test.c
288 tests_libpspp_stringi_set_test_LDADD = gl/libgl.la $(LIBINTL)
289 tests_libpspp_stringi_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
290
291 tests_libpspp_tower_test_SOURCES = \
292         src/libpspp/abt.c \
293         src/libpspp/pool.c \
294         src/libpspp/temp-file.c \
295         src/libpspp/tower.c \
296         tests/libpspp/tower-test.c
297 tests_libpspp_tower_test_LDADD = gl/libgl.la $(LIBINTL) 
298 tests_libpspp_tower_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
299
300 tests_libpspp_sparse_array_test_SOURCES = \
301         src/libpspp/sparse-array.c \
302         src/libpspp/pool.c \
303         tests/libpspp/sparse-array-test.c \
304         src/libpspp/temp-file.c
305 tests_libpspp_sparse_array_test_LDADD = gl/libgl.la $(LIBINTL) 
306 tests_libpspp_sparse_array_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
307
308 tests_libpspp_sparse_xarray_test_SOURCES = \
309         src/libpspp/argv-parser.c \
310         src/libpspp/bt.c \
311         src/libpspp/deque.c \
312         src/libpspp/ext-array.c \
313         src/libpspp/model-checker.c \
314         src/libpspp/range-set.c \
315         src/libpspp/sparse-array.c \
316         src/libpspp/sparse-xarray.c \
317         src/libpspp/str.c \
318         src/libpspp/pool.c \
319         src/libpspp/temp-file.c \
320         tests/libpspp/sparse-xarray-test.c
321 tests_libpspp_sparse_xarray_test_LDADD = gl/libgl.la $(LIBINTL) 
322 tests_libpspp_sparse_xarray_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
323
324 tests_formats_inexactify_SOURCES = tests/formats/inexactify.c
325
326 noinst_PROGRAMS += tests/dissect-sysfile
327 tests_dissect_sysfile_SOURCES = \
328         src/libpspp/integer-format.c \
329         src/libpspp/float-format.c \
330         tests/dissect-sysfile.c
331 tests_dissect_sysfile_LDADD = gl/libgl.la $(LIBINTL) 
332 tests_dissect_sysfile_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
333
334 check_PROGRAMS += tests/output/render-test
335 tests_output_render_test_SOURCES = tests/output/render-test.c
336 tests_output_render_test_LDADD = \
337         src/libpspp.la \
338         src/libpspp-core.la \
339         $(CAIRO_LIBS) \
340         $(LIBICONV) \
341         $(LIBINTL)
342
343 EXTRA_DIST += \
344         $(dist_TESTS) \
345         tests/Book1.gnm.unzipped \
346         tests/weighting.data tests/data-list.data tests/list.data \
347         tests/no_case_size.sav \
348         tests/coverage.sh tests/test_template \
349         tests/v13.sav tests/v14.sav \
350         tests/expressions/randist/beta.out \
351         tests/expressions/randist/cauchy.out \
352         tests/expressions/randist/chisq.out \
353         tests/expressions/randist/exp.out \
354         tests/expressions/randist/f.out \
355         tests/expressions/randist/gamma.out \
356         tests/expressions/randist/laplace.out \
357         tests/expressions/randist/lnormal.out \
358         tests/expressions/randist/logistic.out \
359         tests/expressions/randist/normal.out \
360         tests/expressions/randist/pareto.out \
361         tests/expressions/randist/compare.pl \
362         tests/expressions/randist/randist.pl \
363         tests/expressions/randist/randist.txt \
364         tests/expressions/randist/t.out \
365         tests/expressions/randist/uniform.out \
366         tests/expressions/randist/weibull.out \
367         tests/formats/bcd-in.expected.cmp.gz \
368         tests/formats/binhex-out.expected.gz \
369         tests/formats/ib-in.expected.cmp.gz \
370         tests/formats/legacy-in.expected.cmp.gz \
371         tests/formats/num-in.expected.gz \
372         tests/formats/num-out.expected.cmp.gz \
373         tests/formats/num-out-cmp.pl \
374         tests/formats/num-out-compare.pl \
375         tests/formats/num-out-decmp.pl \
376         tests/formats/num-out.pl
377
378 CLEANFILES += *.save pspp.* foo*
379
380 check-for-export-var-val:
381         @if grep -q 'export .*=' $(dist_TESTS) ; then \
382          echo 'One or more tests contain non-portable "export VAR=val" syntax' ; \
383          false ; \
384         fi
385
386 DIST_HOOKS += check-for-export-var-val
387
388 EXTRA_DIST += tests/OChangeLog
389 \f
390 # Autotest testsuite
391
392 EXTRA_DIST += \
393         $(TESTSUITE_AT) \
394         $(TESTSUITE) \
395         tests/atlocal.in \
396         $(srcdir)/package.m4 \
397         $(TESTSUITE)
398
399 TESTSUITE_AT = \
400         tests/data/calendar.at \
401         tests/language/data-io/add-files.at \
402         tests/language/data-io/data-list.at \
403         tests/language/data-io/data-reader.at \
404         tests/language/data-io/save.at \
405         tests/language/data-io/save-translate.at \
406         tests/language/dictionary/attributes.at \
407         tests/language/dictionary/mrsets.at \
408         tests/language/expressions/evaluate.at \
409         tests/language/stats/aggregate.at \
410         tests/language/stats/autorecode.at \
411         tests/language/stats/crosstabs.at \
412         tests/language/stats/descriptives.at \
413         tests/language/stats/factor.at \
414         tests/language/stats/flip.at \
415         tests/language/stats/frequencies.at \
416         tests/language/stats/oneway.at \
417         tests/language/utilities/set.at \
418         tests/language/xforms/compute.at \
419         tests/language/xforms/count.at \
420         tests/language/xforms/recode.at \
421         tests/libpspp/i18n.at \
422         tests/math/moments.at \
423         tests/output/render.at \
424         tests/output/charts.at \
425         tests/perl-module.at
426
427 TESTSUITE = $(srcdir)/tests/testsuite
428 DISTCLEANFILES += tests/atconfig tests/atlocal $(TESTSUITE)
429
430 $(srcdir)/tests/testsuite.at: tests/testsuite.in Makefile
431         cp $< $@
432         for t in $(TESTSUITE_AT); do \
433           echo "m4_include([$$t])" >> $@ ;\
434         done
435
436
437 CHECK_LOCAL += tests_check
438 tests_check: tests/atconfig tests/atlocal $(TESTSUITE)
439         $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=tests/libpspp:tests/output:src/ui/terminal $(TESTSUITEFLAGS)
440
441 CLEAN_LOCAL += tests_clean
442 tests_clean:
443         test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
444
445 AUTOM4TE = $(SHELL) $(srcdir)/build-aux/missing --run autom4te
446 AUTOTEST = $(AUTOM4TE) --language=autotest
447 $(TESTSUITE): package.m4 $(srcdir)/tests/testsuite.at $(TESTSUITE_AT) 
448         $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
449         mv $@.tmp $@
450
451 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
452 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
453         :;{ \
454           echo '# Signature of the current package.' && \
455           echo 'm4_define([AT_PACKAGE_NAME],      [$(PACKAGE_NAME)])' && \
456           echo 'm4_define([AT_PACKAGE_TARNAME],   [$(PACKAGE_TARNAME)])' && \
457           echo 'm4_define([AT_PACKAGE_VERSION],   [$(PACKAGE_VERSION)])' && \
458           echo 'm4_define([AT_PACKAGE_STRING],    [$(PACKAGE_STRING)])' && \
459           echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])' && \
460           echo 'm4_define([AT_PACKAGE_URL],       [$(PACKAGE_URL)])'; \
461         } >'$(srcdir)/package.m4'