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