variable: Also complain about negative weights in var_force_valid_weight().
[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 = src/libpspp/liblibpspp.la \
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
221 tests_libpspp_zip_test_CFLAGS = $(AM_CFLAGS)
222 tests_libpspp_zip_test_LDADD = \
223         src/libpspp/liblibpspp.la \
224         src/libpspp-core.la \
225         gl/libgl.la \
226         $(LIB_GETRANDOM)
227
228 check_PROGRAMS += tests/math/chart-get-scale-test
229 tests_math_chart_get_scale_test_SOURCES = tests/math/chart-get-scale-test.c
230 tests_math_chart_get_scale_test_LDADD = \
231         src/math/libpspp-math.la \
232         src/libpspp/liblibpspp.la \
233         src/libpspp-core.la \
234         gl/libgl.la \
235         $(LIB_GETRANDOM)
236
237 check_PROGRAMS += tests/math/chart-get-ticks-format-test
238 tests_math_chart_get_ticks_format_test_SOURCES = tests/math/chart-get-ticks-format-test.c
239 tests_math_chart_get_ticks_format_test_LDADD = \
240         src/math/libpspp-math.la \
241         src/libpspp/liblibpspp.la \
242         src/libpspp-core.la \
243         gl/libgl.la \
244         $(LIB_GETRANDOM)
245
246 check_PROGRAMS += tests/output/pivot-table-test
247 tests_output_pivot_table_test_SOURCES = tests/output/pivot-table-test.c
248 tests_output_pivot_table_test_LDADD = \
249         src/libpspp.la \
250         src/libpspp-core.la \
251         gl/libgl.la \
252         $(LIB_GETRANDOM) \
253         $(CAIRO_LIBS)
254 EXTRA_DIST += tests/output/look.stt
255
256 check_PROGRAMS += tests/output/ascii-test
257 tests_output_ascii_test_SOURCES = tests/output/ascii-test.c
258 tests_output_ascii_test_LDADD = \
259         src/libpspp.la \
260         src/libpspp-core.la \
261         $(CAIRO_LIBS)
262
263 check_PROGRAMS += tests/ui/syntax-gen-test
264 tests_ui_syntax_gen_test_SOURCES = tests/ui/syntax-gen-test.c
265 tests_ui_syntax_gen_test_LDADD = \
266         src/ui/libuicommon.la \
267         src/libpspp-core.la \
268         $(CAIRO_LIBS)
269
270 check_PROGRAMS += tests/output/tex-glyphs
271 tests_output_tex_glyphs_SOURCES = \
272         tests/output/tex-glyphs.c
273 tests_output_tex_glyphs_LDADD = src/output/liboutput.la src/libpspp-core.la
274 tests_output_tex_glyphs_CFLAGS = $(AM_CFLAGS) -I $(top_srcdir)/src/output
275
276 check_PROGRAMS += tests/output/tex-strings
277 tests_output_tex_strings_SOURCES = \
278         tests/output/tex-strings.c
279 tests_output_tex_strings_LDADD = src/output/liboutput.la src/libpspp-core.la
280 tests_output_tex_strings_CFLAGS = $(AM_CFLAGS) -I $(top_srcdir)/src/output
281
282
283 EXTRA_DIST += \
284         tests/coverage.sh \
285         tests/data/repeating-2.ods \
286         tests/data/simple.ods \
287         tests/data/simple.gnumeric \
288         tests/data/sparse.ods \
289         tests/data/sparse.gnumeric \
290         tests/data/holey.ods \
291         tests/data/holey.gnumeric \
292         tests/data/multisheet.ods \
293         tests/data/multisheet.gnumeric \
294         tests/data/repeating.ods \
295         tests/data/repeating.gnumeric \
296         tests/data/one-thousand-by-fifty-three.ods \
297         tests/data/one-thousand-by-fifty-three.gnumeric \
298         tests/data/CVE-2017-10791.sav \
299         tests/data/CVE-2017-10792.sav \
300         tests/data/bcd-in.expected.cmp.gz \
301         tests/data/binhex-in.expected.cmp.gz \
302         tests/data/binhex-out.expected.gz \
303         tests/data/hotel-encrypted.sav \
304         tests/data/legacy-in.expected.cmp.gz \
305         tests/data/num-in.expected.gz \
306         tests/data/num-out.expected.cmp.gz \
307         tests/data/test-date-input.py \
308         tests/data/test-time-input.py \
309         tests/data/v13.sav \
310         tests/data/v14.sav \
311         tests/data/test-encrypted.sps \
312         tests/data/test-decrypted.spv \
313         tests/data/test-encrypted.spv \
314         tests/language/mann-whitney.txt \
315         tests/language/data-io/Book1.gnm.unzipped \
316         tests/language/data-io/test.ods \
317         tests/language/data-io/newone.ods \
318         tests/language/data-io/readnames.ods \
319         tests/language/stats/llz.zsav \
320         tests/utilities/regress.spv
321
322 CLEANFILES += *.save pspp.* foo*
323 \f
324 # Autotest testsuite
325
326 EXTRA_DIST += \
327         tests/testsuite.in \
328         $(TESTSUITE_AT) \
329         $(TESTSUITE) \
330         tests/atlocal.in \
331         $(srcdir)/package.m4 \
332         $(TESTSUITE)
333
334 TESTSUITE_AT = \
335         tests/data/calendar.at \
336         tests/data/data-in.at \
337         tests/data/data-out.at \
338         tests/data/datasheet-test.at \
339         tests/data/spreadsheet-test.at \
340         tests/data/dictionary.at \
341         tests/data/file.at \
342         tests/data/format-guesser.at \
343         tests/data/mdd-file.at \
344         tests/data/pc+-file-reader.at \
345         tests/data/por-file.at \
346         tests/data/sys-file-reader.at \
347         tests/data/sys-file.at \
348         tests/data/encrypted-file.at \
349         tests/language/command.at \
350         tests/language/control/define.at \
351         tests/language/control/do-if.at \
352         tests/language/control/do-repeat.at \
353         tests/language/control/loop.at \
354         tests/language/control/temporary.at \
355         tests/language/data-io/add-files.at \
356         tests/language/data-io/data-list.at \
357         tests/language/data-io/data-reader.at \
358         tests/language/data-io/dataset.at \
359         tests/language/data-io/file-handle.at \
360         tests/language/data-io/get-data-spreadsheet.at \
361         tests/language/data-io/get-data-psql.at \
362         tests/language/data-io/get-data-txt.at \
363         tests/language/data-io/get.at \
364         tests/language/data-io/inpt-pgm.at \
365         tests/language/data-io/list.at \
366         tests/language/data-io/match-files.at \
367         tests/language/data-io/matrix-data.at \
368         tests/language/data-io/matrix-reader.at \
369         tests/language/data-io/mconvert.at \
370         tests/language/data-io/print-space.at \
371         tests/language/data-io/print.at \
372         tests/language/data-io/save.at \
373         tests/language/data-io/save-translate.at \
374         tests/language/data-io/update.at \
375         tests/language/dictionary/attributes.at \
376         tests/language/dictionary/apply.at \
377         tests/language/dictionary/delete-variables.at \
378         tests/language/dictionary/formats.at \
379         tests/language/dictionary/missing-values.at \
380         tests/language/dictionary/mrsets.at \
381         tests/language/dictionary/modify-variables.at \
382         tests/language/dictionary/rename-variables.at \
383         tests/language/dictionary/sort-variables.at \
384         tests/language/dictionary/split-file.at \
385         tests/language/dictionary/sys-file-info.at \
386         tests/language/dictionary/value-labels.at \
387         tests/language/dictionary/variable-display.at \
388         tests/language/dictionary/vector.at \
389         tests/language/dictionary/weight.at \
390         tests/language/expressions/evaluate.at \
391         tests/language/expressions/parse.at \
392         tests/language/lexer/command-name.at \
393         tests/language/lexer/lexer.at \
394         tests/language/lexer/scan.at \
395         tests/language/lexer/segment.at \
396         tests/language/lexer/variable-parser.at \
397         tests/language/stats/aggregate.at \
398         tests/language/stats/autorecode.at \
399         tests/language/stats/correlations.at \
400         tests/language/stats/crosstabs.at \
401         tests/language/stats/descriptives.at \
402         tests/language/stats/examine.at \
403         tests/language/stats/graph.at \
404         tests/language/stats/factor.at \
405         tests/language/stats/flip.at \
406         tests/language/stats/frequencies.at \
407         tests/language/stats/glm.at \
408         tests/language/stats/logistic.at \
409         tests/language/stats/matrix.at \
410         tests/language/stats/means.at \
411         tests/language/stats/npar.at \
412         tests/language/stats/oneway.at \
413         tests/language/stats/quick-cluster.at \
414         tests/language/stats/rank.at \
415         tests/language/stats/regression.at \
416         tests/language/stats/reliability.at \
417         tests/language/stats/roc.at \
418         tests/language/stats/sort-cases.at \
419         tests/language/stats/t-test.at \
420         tests/language/utilities/cache.at \
421         tests/language/utilities/cd.at \
422         tests/language/utilities/date.at \
423         tests/language/utilities/host.at \
424         tests/language/utilities/insert.at \
425         tests/language/utilities/permissions.at \
426         tests/language/utilities/set.at \
427         tests/language/utilities/show.at \
428         tests/language/utilities/title.at \
429         tests/language/xforms/compute.at \
430         tests/language/xforms/count.at \
431         tests/language/xforms/recode.at \
432         tests/language/xforms/sample.at \
433         tests/language/xforms/select-if.at \
434         tests/libpspp/abt.at \
435         tests/libpspp/bt.at \
436         tests/libpspp/encoding-guesser.at \
437         tests/libpspp/float-format.at \
438         tests/libpspp/heap.at \
439         tests/libpspp/hmap.at \
440         tests/libpspp/hmapx.at \
441         tests/libpspp/i18n.at \
442         tests/libpspp/line-reader.at \
443         tests/libpspp/ll.at \
444         tests/libpspp/llx.at \
445         tests/libpspp/range-map.at \
446         tests/libpspp/range-set.at \
447         tests/libpspp/range-tower.at \
448         tests/libpspp/sparse-array.at \
449         tests/libpspp/sparse-xarray-test.at \
450         tests/libpspp/str.at \
451         tests/libpspp/string-map.at \
452         tests/libpspp/stringi-map.at \
453         tests/libpspp/string-set.at \
454         tests/libpspp/stringi-set.at \
455         tests/libpspp/tower.at \
456         tests/libpspp/u8-istream.at \
457         tests/libpspp/zip.at \
458         tests/math/chart-geometry.at \
459         tests/math/moments.at \
460         tests/math/randist.at \
461         tests/output/ascii.at \
462         tests/output/charts.at \
463         tests/output/html.at \
464         tests/output/output.at \
465         tests/output/paper-size.at \
466         tests/output/pivot-table.at \
467         tests/output/render.at \
468         tests/output/tables.at \
469         tests/output/tex.at \
470         tests/ui/terminal/main.at \
471         tests/ui/syntax-gen.at \
472         tests/utilities/pspp-convert.at \
473         tests/utilities/pspp-output.at \
474         tests/perl-module.at
475
476 TESTSUITE = $(srcdir)/tests/testsuite
477 DISTCLEANFILES += tests/atconfig tests/atlocal
478 AUTOTEST_PATH = tests/data:tests/language/lexer:tests/libpspp:tests/output:tests/math:src/ui/terminal:utilities
479
480 $(srcdir)/tests/testsuite.at: tests/testsuite.in tests/automake.mk
481         $(AM_V_GEN)printf '\043 Generated automatically -- do not modify!    -*- buffer-read-only: t -*-\n' > $@,tmp
482         $(AM_V_at)cat $< >> $@,tmp
483         $(AM_V_at)for t in $(TESTSUITE_AT); do \
484           echo "m4_include([$$t])" >> $@,tmp ;\
485         done
486         mv $@,tmp $@
487
488 EXTRA_DIST += tests/testsuite.at
489
490 CHECK_LOCAL += tests_check
491 tests_check: tests/atconfig tests/atlocal $(TESTSUITE) $(check_PROGRAMS)
492         XTERM_LOCALE='' $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) RUNNER='$(RUNNER)' $(TESTSUITEFLAGS)
493
494 CLEAN_LOCAL += tests_clean
495 tests_clean:
496         test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
497
498 AUTOM4TE = $(SHELL) $(srcdir)/build-aux/missing --run autom4te
499 AUTOTEST = $(AUTOM4TE) --language=autotest
500 $(TESTSUITE): package.m4 $(srcdir)/tests/testsuite.at $(TESTSUITE_AT)
501         $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' $@.at | $(SED) 's/@<00A0>@/ /g' > $@.tmp
502         test -s $@.tmp
503         $(AM_V_at)mv $@.tmp $@
504
505 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
506 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
507         $(AM_V_GEN):;{ \
508           echo '# Signature of the current package.' && \
509           echo 'm4_define([AT_PACKAGE_NAME],      [$(PACKAGE_NAME)])' && \
510           echo 'm4_define([AT_PACKAGE_TARNAME],   [$(PACKAGE_TARNAME)])' && \
511           echo 'm4_define([AT_PACKAGE_VERSION],   [$(PACKAGE_VERSION)])' && \
512           echo 'm4_define([AT_PACKAGE_STRING],    [$(PACKAGE_STRING)])' && \
513           echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])' && \
514           echo 'm4_define([AT_PACKAGE_URL],       [$(PACKAGE_URL)])'; \
515         } >'$(srcdir)/package.m4'
516
517 check-valgrind:
518         $(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'
519         @echo
520         @echo '--------------------------------'
521         @echo 'Valgrind output is in:'
522         @echo 'tests/testsuite.dir/*/valgrind.*'
523         @echo '--------------------------------'
524 EXTRA_DIST += tests/valgrind.supp tests/lsan.supp