rust
[pspp] / tests / automake.mk
1 # PSPP - a program for statistical analysis.
2 # Copyright (C) 2017 Free Software Foundation, Inc.
3 #
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 #
17 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
18
19 check-programs: $(check_PROGRAMS)
20
21 check_PROGRAMS += tests/data/datasheet-test
22 tests_data_datasheet_test_SOURCES = \
23         tests/data/datasheet-test.c
24 tests_data_datasheet_test_LDADD = src/libpspp-core.la
25 tests_data_datasheet_test_CFLAGS = $(AM_CFLAGS)
26
27 check_PROGRAMS += tests/data/sack
28 tests_data_sack_SOURCES = \
29         tests/data/sack.c
30 tests_data_sack_LDADD = src/libpspp-core.la
31 tests_data_sack_CFLAGS = $(AM_CFLAGS)
32
33 check_PROGRAMS += tests/data/spreadsheet-test
34 tests_data_spreadsheet_test_SOURCES = \
35         tests/data/spreadsheet-test.c
36 tests_data_spreadsheet_test_LDADD = src/libpspp-core.la
37 tests_data_spreadsheet_test_CFLAGS = $(AM_CFLAGS)
38
39 check_PROGRAMS += tests/libpspp/line-reader-test
40 tests_libpspp_line_reader_test_SOURCES = tests/libpspp/line-reader-test.c
41 tests_libpspp_line_reader_test_LDADD = src/libpspp-core.la
42
43 check_PROGRAMS += tests/libpspp/ll-test
44 tests_libpspp_ll_test_SOURCES = \
45         src/libpspp/ll.c \
46         tests/libpspp/ll-test.c
47 tests_libpspp_ll_test_CFLAGS = $(AM_CFLAGS)
48
49 check_PROGRAMS += tests/libpspp/llx-test
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 check_PROGRAMS += tests/libpspp/encoding-guesser-test
57 tests_libpspp_encoding_guesser_test_SOURCES = \
58         tests/libpspp/encoding-guesser-test.c
59 tests_libpspp_encoding_guesser_test_LDADD = src/libpspp-core.la
60
61 check_PROGRAMS += tests/libpspp/heap-test
62 tests_libpspp_heap_test_SOURCES = \
63         tests/libpspp/heap-test.c
64 tests_libpspp_heap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
65 tests_libpspp_heap_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la $(LIB_GETRANDOM)
66
67 check_PROGRAMS += tests/libpspp/hmap-test
68 tests_libpspp_hmap_test_SOURCES = \
69         src/libpspp/hmap.c \
70         tests/libpspp/hmap-test.c
71 tests_libpspp_hmap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
72
73 check_PROGRAMS += tests/libpspp/hmapx-test
74 tests_libpspp_hmapx_test_SOURCES = \
75         src/libpspp/hmap.c \
76         src/libpspp/hmapx.c \
77         tests/libpspp/hmapx-test.c
78 tests_libpspp_hmapx_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
79
80 check_PROGRAMS += tests/libpspp/i18n-test
81 tests_libpspp_i18n_test_SOURCES = tests/libpspp/i18n-test.c
82 tests_libpspp_i18n_test_LDADD = src/libpspp-core.la gl/libgl.la $(LIB_GETRANDOM)
83
84 check_PROGRAMS += tests/libpspp/abt-test
85 tests_libpspp_abt_test_SOURCES = \
86         src/libpspp/abt.c \
87         tests/libpspp/abt-test.c
88 tests_libpspp_abt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
89
90 check_PROGRAMS += tests/libpspp/bt-test
91 tests_libpspp_bt_test_SOURCES = \
92         src/libpspp/bt.c \
93         tests/libpspp/bt-test.c
94 tests_libpspp_bt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
95
96 check_PROGRAMS += tests/libpspp/cmac-aes256-test
97 tests_libpspp_cmac_aes256_test_SOURCES = \
98         src/libpspp/cmac-aes256.c \
99         tests/libpspp/cmac-aes256-test.c
100 tests_libpspp_cmac_aes256_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
101
102 check_PROGRAMS += tests/libpspp/range-map-test
103 tests_libpspp_range_map_test_SOURCES = \
104         src/libpspp/bt.c \
105         src/libpspp/range-map.c \
106         tests/libpspp/range-map-test.c
107 tests_libpspp_range_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
108
109 check_PROGRAMS += tests/libpspp/range-set-test
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 $(LIB_GETRANDOM)
114
115 check_PROGRAMS += tests/libpspp/range-tower-test
116 tests_libpspp_range_tower_test_SOURCES = \
117         tests/libpspp/range-tower-test.c
118 tests_libpspp_range_tower_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
119 tests_libpspp_range_tower_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la $(LIB_GETRANDOM)
120
121 check_PROGRAMS += tests/libpspp/str-test
122 tests_libpspp_str_test_SOURCES = \
123         tests/libpspp/str-test.c
124 tests_libpspp_str_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la $(LIB_GETRANDOM)
125
126 check_PROGRAMS += tests/libpspp/string-map-test
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 $(LIB_GETRANDOM)
131
132 check_PROGRAMS += tests/libpspp/stringi-map-test
133 tests_libpspp_stringi_map_test_SOURCES = \
134         tests/libpspp/stringi-map-test.c
135 tests_libpspp_stringi_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
136 tests_libpspp_stringi_map_test_LDADD = src/libpspp-core.la
137
138 check_PROGRAMS += tests/libpspp/string-set-test
139 tests_libpspp_string_set_test_SOURCES = \
140         src/libpspp/hash-functions.c \
141         src/libpspp/hmap.c \
142         src/libpspp/string-set.c \
143         tests/libpspp/string-set-test.c
144 tests_libpspp_string_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
145
146 check_PROGRAMS += tests/libpspp/stringi-set-test
147 tests_libpspp_stringi_set_test_SOURCES = \
148         tests/libpspp/stringi-set-test.c
149 tests_libpspp_stringi_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
150 tests_libpspp_stringi_set_test_LDADD = src/libpspp-core.la
151
152 check_PROGRAMS += tests/libpspp/tower-test
153 tests_libpspp_tower_test_SOURCES = \
154         tests/libpspp/tower-test.c
155 tests_libpspp_tower_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
156 tests_libpspp_tower_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la $(LIB_GETRANDOM)
157
158 check_PROGRAMS += tests/libpspp/u8-istream-test
159 tests_libpspp_u8_istream_test_SOURCES = tests/libpspp/u8-istream-test.c
160 tests_libpspp_u8_istream_test_LDADD = src/libpspp-core.la
161
162 check_PROGRAMS += tests/libpspp/sparse-array-test
163 tests_libpspp_sparse_array_test_SOURCES = \
164         tests/libpspp/sparse-array-test.c
165 tests_libpspp_sparse_array_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
166 tests_libpspp_sparse_array_test_LDADD = src/libpspp/liblibpspp.la gl/libgl.la $(LIB_GETRANDOM)
167
168 check_PROGRAMS += tests/libpspp/sparse-xarray-test
169 tests_libpspp_sparse_xarray_test_SOURCES = \
170         tests/libpspp/sparse-xarray-test.c
171 tests_libpspp_sparse_xarray_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
172 tests_libpspp_sparse_xarray_test_LDADD = \
173         src/libpspp-core.la \
174         gl/libgl.la \
175         $(LIB_GETRANDOM)
176
177 check_PROGRAMS += tests/data/inexactify
178 tests_data_inexactify_SOURCES = tests/data/inexactify.c
179
180 check_PROGRAMS += tests/language/lexer/command-name-test
181 tests_language_lexer_command_name_test_SOURCES = \
182         src/data/identifier.c \
183         src/language/lexer/command-name.c \
184         tests/language/lexer/command-name-test.c
185 tests_language_lexer_command_name_test_LDADD = \
186         src/libpspp/liblibpspp.la \
187         gl/libgl.la \
188         $(LIB_GETRANDOM)
189 tests_language_lexer_command_name_test_CFLAGS = $(AM_CFLAGS)
190
191 check_PROGRAMS += tests/language/lexer/scan-test
192 tests_language_lexer_scan_test_SOURCES = \
193         src/data/identifier.c \
194         src/language/lexer/command-name.c \
195         src/language/lexer/scan.c \
196         src/language/lexer/segment.c \
197         src/language/lexer/token.c \
198         tests/language/lexer/scan-test.c
199 tests_language_lexer_scan_test_CFLAGS = $(AM_CFLAGS)
200 tests_language_lexer_scan_test_LDADD = \
201         src/libpspp/liblibpspp.la \
202         gl/libgl.la \
203         $(LIB_GETRANDOM)
204
205 check_PROGRAMS += tests/language/lexer/segment-test
206 tests_language_lexer_segment_test_SOURCES = \
207         src/data/identifier.c \
208         src/language/lexer/command-name.c \
209         src/language/lexer/segment.c \
210         tests/language/lexer/segment-test.c
211 tests_language_lexer_segment_test_CFLAGS = $(AM_CFLAGS)
212 tests_language_lexer_segment_test_LDADD = \
213         src/libpspp/liblibpspp.la \
214         gl/libgl.la \
215         $(LIB_GETRANDOM)
216
217 check_PROGRAMS += tests/libpspp/zip-test
218 tests_libpspp_zip_test_SOURCES = \
219         tests/libpspp/zip-test.c
220 tests_libpspp_zip_test_CFLAGS = $(AM_CFLAGS)
221 tests_libpspp_zip_test_LDADD = \
222         src/libpspp-core.la \
223         gl/libgl.la \
224         $(LIB_GETRANDOM)
225
226 check_PROGRAMS += tests/math/chart-get-scale-test
227 tests_math_chart_get_scale_test_SOURCES = tests/math/chart-get-scale-test.c
228 tests_math_chart_get_scale_test_LDADD = \
229         src/math/libpspp-math.la \
230         src/libpspp/liblibpspp.la \
231         gl/libgl.la \
232         $(LIB_GETRANDOM)
233
234 check_PROGRAMS += tests/math/chart-get-ticks-format-test
235 tests_math_chart_get_ticks_format_test_SOURCES = tests/math/chart-get-ticks-format-test.c
236 tests_math_chart_get_ticks_format_test_LDADD = \
237         src/math/libpspp-math.la \
238         src/libpspp/liblibpspp.la \
239         gl/libgl.la \
240         $(LIB_GETRANDOM)
241
242 check_PROGRAMS += tests/output/pivot-table-test
243 tests_output_pivot_table_test_SOURCES = tests/output/pivot-table-test.c
244 tests_output_pivot_table_test_LDADD = \
245         src/libpspp.la \
246         src/libpspp-core.la \
247         gl/libgl.la \
248         $(LIB_GETRANDOM) \
249         $(CAIRO_LIBS)
250 EXTRA_DIST += tests/output/look.stt
251
252 check_PROGRAMS += tests/output/ascii-test
253 tests_output_ascii_test_SOURCES = tests/output/ascii-test.c
254 tests_output_ascii_test_LDADD = \
255         src/libpspp.la \
256         src/libpspp-core.la \
257         $(CAIRO_LIBS)
258
259 check_PROGRAMS += tests/ui/syntax-gen-test
260 tests_ui_syntax_gen_test_SOURCES = tests/ui/syntax-gen-test.c
261 tests_ui_syntax_gen_test_LDADD = \
262         src/ui/libuicommon.la \
263         src/libpspp-core.la \
264         $(CAIRO_LIBS)
265
266 check_PROGRAMS += tests/output/tex-glyphs
267 tests_output_tex_glyphs_SOURCES = \
268         tests/output/tex-glyphs.c
269 tests_output_tex_glyphs_LDADD = src/output/liboutput.la src/libpspp-core.la
270 tests_output_tex_glyphs_CFLAGS = $(AM_CFLAGS) -I $(top_srcdir)/src/output
271
272 check_PROGRAMS += tests/output/tex-strings
273 tests_output_tex_strings_SOURCES = \
274         tests/output/tex-strings.c
275 tests_output_tex_strings_LDADD = src/output/liboutput.la src/libpspp-core.la
276 tests_output_tex_strings_CFLAGS = $(AM_CFLAGS) -I $(top_srcdir)/src/output
277
278
279 EXTRA_DIST += \
280         tests/coverage.sh \
281         tests/data/repeating-2.ods \
282         tests/data/simple.ods \
283         tests/data/simple.gnumeric \
284         tests/data/sparse.ods \
285         tests/data/sparse.gnumeric \
286         tests/data/holey.ods \
287         tests/data/holey.gnumeric \
288         tests/data/multisheet.ods \
289         tests/data/multisheet.gnumeric \
290         tests/data/repeating.ods \
291         tests/data/repeating.gnumeric \
292         tests/data/one-thousand-by-fifty-three.ods \
293         tests/data/one-thousand-by-fifty-three.gnumeric \
294         tests/data/CVE-2017-10791.sav \
295         tests/data/CVE-2017-10792.sav \
296         tests/data/bcd-in.expected.cmp.gz \
297         tests/data/binhex-in.expected.cmp.gz \
298         tests/data/binhex-out.expected.gz \
299         tests/data/hotel-encrypted.sav \
300         tests/data/legacy-in.expected.cmp.gz \
301         tests/data/num-in.expected.gz \
302         tests/data/num-out.expected.cmp.gz \
303         tests/data/test-date-input.py \
304         tests/data/test-time-input.py \
305         tests/data/v13.sav \
306         tests/data/v14.sav \
307         tests/data/test-encrypted.sps \
308         tests/data/test-decrypted.spv \
309         tests/data/test-encrypted.spv \
310         tests/language/mann-whitney.txt \
311         tests/language/commands/Book1.gnm.unzipped \
312         tests/language/commands/test.ods \
313         tests/language/commands/newone.ods \
314         tests/language/commands/readnames.ods \
315         tests/language/commands/nhtsa.sav \
316         tests/language/commands/llz.zsav \
317         tests/ui/terminal/squish-pty.py \
318         tests/utilities/regress.spv
319
320 CLEANFILES += *.save pspp.* foo*
321 \f
322 # Autotest testsuite
323
324 EXTRA_DIST += \
325         tests/testsuite.in \
326         $(TESTSUITE_AT) \
327         $(TESTSUITE) \
328         tests/atlocal.in \
329         $(srcdir)/package.m4 \
330         $(TESTSUITE)
331
332 TESTSUITE_AT = \
333         tests/data/calendar.at \
334         tests/data/data-in.at \
335         tests/data/data-out.at \
336         tests/data/datasheet-test.at \
337         tests/data/spreadsheet-test.at \
338         tests/data/dictionary.at \
339         tests/data/file.at \
340         tests/data/format-guesser.at \
341         tests/data/mdd-file.at \
342         tests/data/pc+-file-reader.at \
343         tests/data/por-file.at \
344         tests/data/sys-file-reader.at \
345         tests/data/sys-file.at \
346         tests/data/encrypted-file.at \
347         tests/language/command.at \
348         tests/language/lexer/command-name.at \
349         tests/language/lexer/lexer.at \
350         tests/language/lexer/scan.at \
351         tests/language/lexer/segment.at \
352         tests/language/lexer/variable-parser.at \
353         tests/language/expressions/evaluate.at \
354         tests/language/expressions/parse.at \
355         tests/language/commands/add-files.at \
356         tests/language/commands/aggregate.at \
357         tests/language/commands/apply.at \
358         tests/language/commands/attributes.at \
359         tests/language/commands/autorecode.at \
360         tests/language/commands/cache.at \
361         tests/language/commands/cd.at \
362         tests/language/commands/compute.at \
363         tests/language/commands/correlations.at \
364         tests/language/commands/count.at \
365         tests/language/commands/crosstabs.at \
366         tests/language/commands/ctables.at \
367         tests/language/commands/data-list.at \
368         tests/language/commands/data-reader.at \
369         tests/language/commands/dataset.at \
370         tests/language/commands/date.at \
371         tests/language/commands/define.at \
372         tests/language/commands/delete-variables.at \
373         tests/language/commands/descriptives.at \
374         tests/language/commands/do-if.at \
375         tests/language/commands/do-repeat.at \
376         tests/language/commands/examine.at \
377         tests/language/commands/factor.at \
378         tests/language/commands/file-handle.at \
379         tests/language/commands/flip.at \
380         tests/language/commands/formats.at \
381         tests/language/commands/frequencies.at \
382         tests/language/commands/get-data-psql.at \
383         tests/language/commands/get-data-spreadsheet.at \
384         tests/language/commands/get-data-txt.at \
385         tests/language/commands/get-data.at \
386         tests/language/commands/get.at \
387         tests/language/commands/glm.at \
388         tests/language/commands/graph.at \
389         tests/language/commands/host.at \
390         tests/language/commands/inpt-pgm.at \
391         tests/language/commands/insert.at \
392         tests/language/commands/leave.at \
393         tests/language/commands/list.at \
394         tests/language/commands/logistic.at \
395         tests/language/commands/loop.at \
396         tests/language/commands/match-files.at \
397         tests/language/commands/matrix-data.at \
398         tests/language/commands/matrix-reader.at \
399         tests/language/commands/matrix.at \
400         tests/language/commands/mconvert.at \
401         tests/language/commands/means.at \
402         tests/language/commands/missing-values.at \
403         tests/language/commands/mrsets.at \
404         tests/language/commands/npar.at \
405         tests/language/commands/numeric.at \
406         tests/language/commands/oneway.at \
407         tests/language/commands/output.at \
408         tests/language/commands/permissions.at \
409         tests/language/commands/print-space.at \
410         tests/language/commands/print.at \
411         tests/language/commands/quick-cluster.at \
412         tests/language/commands/rank.at \
413         tests/language/commands/recode.at \
414         tests/language/commands/regression.at \
415         tests/language/commands/reliability.at \
416         tests/language/commands/rename-variables.at \
417         tests/language/commands/roc.at \
418         tests/language/commands/sample.at \
419         tests/language/commands/save-translate.at \
420         tests/language/commands/save.at \
421         tests/language/commands/select-if.at \
422         tests/language/commands/set.at \
423         tests/language/commands/show.at \
424         tests/language/commands/sort-cases.at \
425         tests/language/commands/sort-variables.at \
426         tests/language/commands/split-file.at \
427         tests/language/commands/string.at \
428         tests/language/commands/sys-file-info.at \
429         tests/language/commands/t-test.at \
430         tests/language/commands/temporary.at \
431         tests/language/commands/title.at \
432         tests/language/commands/update.at \
433         tests/language/commands/value-labels.at \
434         tests/language/commands/variable-labels.at \
435         tests/language/commands/variable-display.at \
436         tests/language/commands/vector.at \
437         tests/language/commands/weight.at \
438         tests/libpspp/abt.at \
439         tests/libpspp/bt.at \
440         tests/libpspp/encoding-guesser.at \
441         tests/libpspp/float-format.at \
442         tests/libpspp/heap.at \
443         tests/libpspp/hmap.at \
444         tests/libpspp/hmapx.at \
445         tests/libpspp/i18n.at \
446         tests/libpspp/line-reader.at \
447         tests/libpspp/ll.at \
448         tests/libpspp/llx.at \
449         tests/libpspp/range-map.at \
450         tests/libpspp/range-set.at \
451         tests/libpspp/range-tower.at \
452         tests/libpspp/sparse-array.at \
453         tests/libpspp/sparse-xarray-test.at \
454         tests/libpspp/str.at \
455         tests/libpspp/string-map.at \
456         tests/libpspp/stringi-map.at \
457         tests/libpspp/string-set.at \
458         tests/libpspp/stringi-set.at \
459         tests/libpspp/tower.at \
460         tests/libpspp/u8-istream.at \
461         tests/libpspp/zip.at \
462         tests/math/chart-geometry.at \
463         tests/math/moments.at \
464         tests/math/randist.at \
465         tests/output/ascii.at \
466         tests/output/charts.at \
467         tests/output/html.at \
468         tests/output/output.at \
469         tests/output/paper-size.at \
470         tests/output/pivot-table.at \
471         tests/output/render.at \
472         tests/output/tables.at \
473         tests/output/tex.at \
474         tests/ui/terminal/main.at \
475         tests/ui/syntax-gen.at \
476         tests/utilities/pspp-convert.at \
477         tests/utilities/pspp-output.at \
478         tests/perl-module.at
479
480 TESTSUITE = $(srcdir)/tests/testsuite
481 DISTCLEANFILES += tests/atconfig tests/atlocal
482 AUTOTEST_PATH = tests/data:tests/language/lexer:tests/libpspp:tests/output:tests/math:src/ui/terminal:utilities
483
484 $(srcdir)/tests/testsuite.at: tests/testsuite.in tests/automake.mk
485         $(AM_V_GEN)printf '\043 Generated automatically -- do not modify!    -*- buffer-read-only: t -*-\n' > $@,tmp
486         $(AM_V_at)cat $< >> $@,tmp
487         $(AM_V_at)for t in $(TESTSUITE_AT); do \
488           echo "m4_include([$$t])" >> $@,tmp ;\
489         done
490         mv $@,tmp $@
491
492 EXTRA_DIST += tests/testsuite.at
493
494 # Generate a TableLook that prints all layers of pivot tables.
495 check_DATA = tests/all-layers.stt
496 tests/all-layers.stt: utilities/pspp-output
497         $(AM_V_GEN)$< get-table-look - $@.tmp
498         $(AM_V_at)if grep 'printAllLayers="false"' $@.tmp >/dev/null; then :; else \
499                 echo >&2 "$<: expected printAllLayers=\"false\""; exit 1; fi
500         $(AM_v_at)sed 's/printAllLayers="false"/printAllLayers="true"/' < $@.tmp > $@
501
502 CHECK_LOCAL += tests_check
503 tests_check: tests/atconfig tests/atlocal $(TESTSUITE) $(check_PROGRAMS) $(check_DATA)
504         XTERM_LOCALE='' $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) RUNNER='$(RUNNER)' $(TESTSUITEFLAGS)
505
506 CLEAN_LOCAL += tests_clean
507 tests_clean:
508         test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
509
510 AUTOM4TE = $(SHELL) $(srcdir)/build-aux/missing --run autom4te
511 AUTOTEST = $(AUTOM4TE) --language=autotest
512 $(TESTSUITE): package.m4 $(srcdir)/tests/testsuite.at $(TESTSUITE_AT)
513         $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' $@.at | $(SED) 's/@<00A0>@/ /g' > $@.tmp
514         test -s $@.tmp
515         $(AM_V_at)mv $@.tmp $@
516
517 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
518 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
519         $(AM_V_GEN):;{ \
520           echo '# Signature of the current package.' && \
521           echo 'm4_define([AT_PACKAGE_NAME],      [$(PACKAGE_NAME)])' && \
522           echo 'm4_define([AT_PACKAGE_TARNAME],   [$(PACKAGE_TARNAME)])' && \
523           echo 'm4_define([AT_PACKAGE_VERSION],   [$(PACKAGE_VERSION)])' && \
524           echo 'm4_define([AT_PACKAGE_STRING],    [$(PACKAGE_STRING)])' && \
525           echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])' && \
526           echo 'm4_define([AT_PACKAGE_URL],       [$(PACKAGE_URL)])'; \
527         } >'$(srcdir)/package.m4'
528
529 check-valgrind:
530         $(MAKE) check RUNNER='$(SHELL) $(abs_top_builddir)/libtool --mode=execute valgrind --log-file=valgrind.%p --leak-check=full --num-callers=20 --suppressions=$(abs_top_srcdir)/tests/valgrind.supp --read-inline-info=yes --read-var-info=yes' TESTSUITEFLAGS='$(TESTSUITEFLAGS) -d'
531         @echo
532         @echo '--------------------------------'
533         @echo 'Valgrind output is in:'
534         @echo 'tests/testsuite.dir/*/valgrind.*'
535         @echo '--------------------------------'
536 EXTRA_DIST += tests/valgrind.supp tests/lsan.supp