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