## Process this file with automake to produce Makefile.in -*- makefile -*-
-TESTS_ENVIRONMENT = top_srcdir='$(top_srcdir)' top_builddir='$(top_builddir)'
-TESTS_ENVIRONMENT += PERL='$(PERL)' PG_CONFIG='$(PG_CONFIG)'
-
-# Allow locale_charset to find charset.alias before running "make install".
-TESTS_ENVIRONMENT += CHARSETALIASDIR='$(abs_top_builddir)/gl'
-
-TESTS_ENVIRONMENT += LC_ALL=C
-TESTS_ENVIRONMENT += EXEEXT=$(EXEEXT)
-
-dist_TESTS = \
- tests/command/import-export.sh \
- tests/command/insert.sh \
- tests/command/lag.sh \
- tests/command/line-ends.sh \
- tests/command/list.sh \
- tests/command/loop.sh \
- tests/command/longvars.sh \
- tests/command/match-files.sh \
- tests/command/missing-values.sh \
- tests/command/no_case_size.sh \
- tests/command/n_of_cases.sh \
- tests/command/npar-binomial.sh \
- tests/command/npar-chisquare.sh \
- tests/command/npar-wilcoxon.sh \
- tests/command/npar-sign.sh \
- tests/command/permissions.sh \
- tests/command/print.sh \
- tests/command/print-strings.sh \
- tests/command/rank.sh \
- tests/command/rename.sh \
- tests/command/regression.sh \
- tests/command/regression-qr.sh \
- tests/command/reliability.sh \
- tests/command/roc.sh \
- tests/command/roc2.sh \
- tests/command/sample.sh \
- tests/command/sort.sh \
- tests/command/sysfiles.sh \
- tests/command/sysfiles-old.sh \
- tests/command/sysfile-info.sh \
- tests/command/split-file.sh \
- tests/command/t-test-1-indep-val.sh \
- tests/command/t-test-1-sample-missing-anal.sh \
- tests/command/t-test-1-sample-missing-list.sh \
- tests/command/t-test-1s.sh \
- tests/command/t-test-groups.sh \
- tests/command/t-test-indep-missing-anal.sh \
- tests/command/t-test-indep-missing-list.sh \
- tests/command/t-test-paired-missing-anal.sh \
- tests/command/t-test-paired-missing-list.sh \
- tests/command/t-test-pairs.sh \
- tests/command/trimmed-mean.sh \
- tests/command/tabs.sh \
- tests/command/update.sh \
- tests/command/use.sh \
- tests/command/variable-display.sh \
- tests/command/vector.sh \
- tests/command/very-long-strings.sh \
- tests/command/weight.sh \
- tests/formats/bcd-in.sh \
- tests/formats/binhex-out.sh \
- tests/formats/date-in.sh \
- tests/formats/date-out.sh \
- tests/formats/float-format.sh \
- tests/formats/format-guesser.sh \
- tests/formats/ib-in.sh \
- tests/formats/legacy-in.sh \
- tests/formats/month-in.sh \
- tests/formats/month-out.sh \
- tests/formats/num-in.sh \
- tests/formats/num-out.sh \
- tests/formats/time-in.sh \
- tests/formats/time-out.sh \
- tests/formats/wkday-in.sh \
- tests/formats/wkday-out.sh \
- tests/formats/360.sh \
- tests/bugs/big-input.sh \
- tests/bugs/big-input-2.sh \
- tests/bugs/case-map.sh \
- tests/bugs/comment-at-eof.sh \
- tests/bugs/compression.sh \
- tests/bugs/curtailed.sh \
- tests/bugs/data-crash.sh \
- tests/bugs/get.sh \
- tests/bugs/get-no-file.sh \
- tests/bugs/if_crash.sh \
- tests/bugs/input-crash.sh \
- tests/bugs/lag_crash.sh \
- tests/bugs/list-overflow.sh \
- tests/bugs/match-files-scratch.sh \
- tests/bugs/multipass.sh \
- tests/bugs/overwrite-input-file.sh \
- tests/bugs/overwrite-special-file.sh \
- tests/bugs/random.sh \
- tests/bugs/shbang.sh \
- tests/bugs/signals.sh \
- tests/bugs/t-test-with-temp.sh \
- tests/bugs/t-test.sh \
- tests/bugs/t-test-alpha.sh \
- tests/bugs/t-test-alpha2.sh \
- tests/bugs/t-test-alpha3.sh \
- tests/bugs/t-test-paired.sh \
- tests/bugs/temporary.sh \
- tests/bugs/unwritable-dir.sh \
- tests/bugs/val-labs.sh \
- tests/bugs/val-labs-trailing-slash.sh \
- tests/bugs/print-crash.sh \
- tests/bugs/keep-all.sh \
- tests/data/datasheet-test.sh \
- tests/libpspp/sparse-xarray-test.sh \
- tests/output/paper-size.sh \
- tests/expressions/randist.sh \
- tests/expressions/valuelabel.sh \
- tests/expressions/variables.sh \
- tests/expressions/vectors.sh
-
-TESTS = $(dist_TESTS) $(nodist_TESTS)
-
check_PROGRAMS += \
- $(nodist_TESTS) \
tests/data/datasheet-test \
- tests/formats/inexactify \
+ tests/data/sack \
+ tests/data/inexactify \
+ tests/language/lexer/command-name-test \
+ tests/language/lexer/scan-test \
+ tests/language/lexer/segment-test \
tests/libpspp/abt-test \
tests/libpspp/bt-test \
+ tests/libpspp/encoding-guesser-test \
tests/libpspp/heap-test \
tests/libpspp/hmap-test \
tests/libpspp/hmapx-test \
tests/libpspp/string-set-test \
tests/libpspp/stringi-set-test \
tests/libpspp/tower-test \
+ tests/libpspp/u8-istream-test \
tests/output/render-test
+check-programs: $(check_PROGRAMS)
+
tests_data_datasheet_test_SOURCES = \
tests/data/datasheet-test.c
tests_data_datasheet_test_LDADD = src/libpspp-core.la $(LIBINTL)
tests_data_datasheet_test_CFLAGS = $(AM_CFLAGS)
+tests_data_sack_SOURCES = \
+ tests/data/sack.c
+tests_data_sack_LDADD = src/libpspp-core.la $(LIBINTL)
+tests_data_sack_CFLAGS = $(AM_CFLAGS)
+
tests_libpspp_ll_test_SOURCES = \
src/libpspp/ll.c \
tests/libpspp/ll-test.c
tests_libpspp_llx_test_LDADD = gl/libgl.la $(LIBINTL)
tests_libpspp_llx_test_CFLAGS = $(AM_CFLAGS)
+tests_libpspp_encoding_guesser_test_SOURCES = \
+ tests/libpspp/encoding-guesser-test.c
+tests_libpspp_encoding_guesser_test_LDADD = src/libpspp/libpspp.la gl/libgl.la
+
tests_libpspp_heap_test_SOURCES = \
src/libpspp/heap.c \
src/libpspp/pool.c \
tests_libpspp_tower_test_LDADD = gl/libgl.la $(LIBINTL)
tests_libpspp_tower_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
+tests_libpspp_u8_istream_test_SOURCES = tests/libpspp/u8-istream-test.c
+tests_libpspp_u8_istream_test_LDADD = src/libpspp/libpspp.la gl/libgl.la
+
tests_libpspp_sparse_array_test_SOURCES = \
src/libpspp/sparse-array.c \
src/libpspp/pool.c \
tests_libpspp_sparse_xarray_test_LDADD = gl/libgl.la $(LIBINTL)
tests_libpspp_sparse_xarray_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
-tests_formats_inexactify_SOURCES = tests/formats/inexactify.c
+tests_data_inexactify_SOURCES = tests/data/inexactify.c
noinst_PROGRAMS += tests/dissect-sysfile
tests_dissect_sysfile_SOURCES = \
tests_dissect_sysfile_LDADD = gl/libgl.la $(LIBINTL)
tests_dissect_sysfile_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
+check_PROGRAMS += tests/language/lexer/command-name-test
+tests_language_lexer_command_name_test_SOURCES = \
+ src/data/identifier.c \
+ src/language/lexer/command-name.c \
+ tests/language/lexer/command-name-test.c
+tests_language_lexer_command_name_test_LDADD = \
+ src/libpspp/libpspp.la \
+ gl/libgl.la \
+ $(LIBINTL)
+tests_language_lexer_command_name_test_CFLAGS = $(AM_CFLAGS)
+
+check_PROGRAMS += tests/language/lexer/scan-test
+tests_language_lexer_scan_test_SOURCES = \
+ src/data/identifier.c \
+ src/language/lexer/command-name.c \
+ src/language/lexer/scan.c \
+ src/language/lexer/segment.c \
+ src/language/lexer/token.c \
+ src/libpspp/pool.c \
+ src/libpspp/prompt.c \
+ src/libpspp/str.c \
+ src/libpspp/temp-file.c \
+ tests/language/lexer/scan-test.c
+tests_language_lexer_scan_test_LDADD = gl/libgl.la $(LIBINTL)
+tests_language_lexer_scan_test_CFLAGS = $(AM_CFLAGS)
+
+check_PROGRAMS += tests/language/lexer/segment-test
+tests_language_lexer_segment_test_SOURCES = \
+ src/data/identifier.c \
+ src/language/lexer/command-name.c \
+ src/language/lexer/segment.c \
+ src/libpspp/pool.c \
+ src/libpspp/prompt.c \
+ src/libpspp/str.c \
+ src/libpspp/temp-file.c \
+ tests/language/lexer/segment-test.c
+tests_language_lexer_segment_test_LDADD = gl/libgl.la $(LIBINTL)
+tests_language_lexer_segment_test_CFLAGS = $(AM_CFLAGS)
+
check_PROGRAMS += tests/output/render-test
tests_output_render_test_SOURCES = tests/output/render-test.c
tests_output_render_test_LDADD = \
$(LIBINTL)
EXTRA_DIST += \
- $(dist_TESTS) \
- tests/weighting.data tests/data-list.data tests/list.data \
- tests/no_case_size.sav \
- tests/coverage.sh tests/test_template \
- tests/v13.sav tests/v14.sav \
- tests/expressions/randist/beta.out \
- tests/expressions/randist/cauchy.out \
- tests/expressions/randist/chisq.out \
- tests/expressions/randist/exp.out \
- tests/expressions/randist/f.out \
- tests/expressions/randist/gamma.out \
- tests/expressions/randist/laplace.out \
- tests/expressions/randist/lnormal.out \
- tests/expressions/randist/logistic.out \
- tests/expressions/randist/normal.out \
- tests/expressions/randist/pareto.out \
- tests/expressions/randist/compare.pl \
- tests/expressions/randist/randist.pl \
- tests/expressions/randist/randist.txt \
- tests/expressions/randist/t.out \
- tests/expressions/randist/uniform.out \
- tests/expressions/randist/weibull.out \
- tests/formats/bcd-in.expected.cmp.gz \
- tests/formats/binhex-out.expected.gz \
- tests/formats/ib-in.expected.cmp.gz \
- tests/formats/legacy-in.expected.cmp.gz \
- tests/formats/num-in.expected.gz \
- tests/formats/num-out.expected.cmp.gz \
- tests/formats/num-out-cmp.pl \
- tests/formats/num-out-compare.pl \
- tests/formats/num-out-decmp.pl \
- tests/formats/num-out.pl \
+ tests/coverage.sh \
+ tests/data/bcd-in.expected.cmp.gz \
+ tests/data/binhex-in.expected.cmp.gz \
+ tests/data/binhex-out.expected.gz \
+ tests/data/legacy-in.expected.cmp.gz \
+ tests/data/num-in.expected.gz \
+ tests/data/num-out-cmp.pl \
+ tests/data/num-out.expected.cmp.gz \
+ tests/data/v13.sav \
+ tests/data/v14.sav \
tests/language/data-io/Book1.gnm.unzipped
CLEANFILES += *.save pspp.* foo*
-check-for-export-var-val:
- @if grep -q 'export .*=' $(dist_TESTS) ; then \
- echo 'One or more tests contain non-portable "export VAR=val" syntax' ; \
- false ; \
- fi
-
-DIST_HOOKS += check-for-export-var-val
-
EXTRA_DIST += tests/OChangeLog
\f
# Autotest testsuite
EXTRA_DIST += \
+ tests/testsuite.in \
$(TESTSUITE_AT) \
$(TESTSUITE) \
tests/atlocal.in \
TESTSUITE_AT = \
tests/data/calendar.at \
tests/data/data-in.at \
+ tests/data/data-out.at \
+ tests/data/datasheet-test.at \
+ tests/data/format-guesser.at \
+ tests/data/por-file.at \
+ tests/data/sys-file-reader.at \
+ tests/data/sys-file.at \
tests/language/command.at \
tests/language/control/do-if.at \
tests/language/control/do-repeat.at \
+ tests/language/control/loop.at \
+ tests/language/control/temporary.at \
tests/language/data-io/add-files.at \
tests/language/data-io/data-list.at \
tests/language/data-io/data-reader.at \
+ tests/language/data-io/dataset.at \
tests/language/data-io/file-handle.at \
tests/language/data-io/get-data-gnm.at \
tests/language/data-io/get-data-psql.at \
tests/language/data-io/get-data-txt.at \
+ tests/language/data-io/get.at \
+ tests/language/data-io/inpt-pgm.at \
+ tests/language/data-io/list.at \
+ tests/language/data-io/match-files.at \
+ tests/language/data-io/print-space.at \
+ tests/language/data-io/print.at \
tests/language/data-io/save.at \
tests/language/data-io/save-translate.at \
+ tests/language/data-io/update.at \
tests/language/dictionary/attributes.at \
+ tests/language/dictionary/formats.at \
+ tests/language/dictionary/missing-values.at \
tests/language/dictionary/mrsets.at \
+ tests/language/dictionary/rename-variables.at \
+ tests/language/dictionary/split-file.at \
+ tests/language/dictionary/sys-file-info.at \
+ tests/language/dictionary/value-labels.at \
+ tests/language/dictionary/variable-display.at \
+ tests/language/dictionary/vector.at \
+ tests/language/dictionary/weight.at \
tests/language/expressions/evaluate.at \
+ tests/language/expressions/parse.at \
+ tests/language/lexer/command-name.at \
+ tests/language/lexer/lexer.at \
+ tests/language/lexer/q2c.at \
+ tests/language/lexer/scan.at \
+ tests/language/lexer/segment.at \
+ tests/language/lexer/variable-parser.at \
tests/language/stats/aggregate.at \
tests/language/stats/autorecode.at \
tests/language/stats/correlations.at \
tests/language/stats/factor.at \
tests/language/stats/flip.at \
tests/language/stats/frequencies.at \
+ tests/language/stats/npar.at \
tests/language/stats/oneway.at \
+ tests/language/stats/quick-cluster.at \
+ tests/language/stats/rank.at \
+ tests/language/stats/regression.at \
+ tests/language/stats/reliability.at \
+ tests/language/stats/roc.at \
+ tests/language/stats/sort-cases.at \
+ tests/language/stats/t-test.at \
+ tests/language/utilities/cache.at \
+ tests/language/utilities/date.at \
+ tests/language/utilities/insert.at \
+ tests/language/utilities/permissions.at \
tests/language/utilities/set.at \
tests/language/utilities/title.at \
tests/language/xforms/compute.at \
tests/language/xforms/count.at \
tests/language/xforms/recode.at \
+ tests/language/xforms/sample.at \
tests/language/xforms/select-if.at \
tests/libpspp/abt.at \
tests/libpspp/bt.at \
+ tests/libpspp/encoding-guesser.at \
+ tests/libpspp/float-format.at \
tests/libpspp/heap.at \
tests/libpspp/hmap.at \
tests/libpspp/hmapx.at \
tests/libpspp/range-map.at \
tests/libpspp/range-set.at \
tests/libpspp/sparse-array.at \
+ tests/libpspp/sparse-xarray-test.at \
tests/libpspp/str.at \
tests/libpspp/string-map.at \
tests/libpspp/stringi-map.at \
tests/libpspp/string-set.at \
tests/libpspp/stringi-set.at \
tests/libpspp/tower.at \
+ tests/libpspp/u8-istream.at \
tests/math/moments.at \
- tests/output/render.at \
+ tests/math/randist.at \
+ tests/output/ascii.at \
tests/output/charts.at \
+ tests/output/output.at \
+ tests/output/paper-size.at \
+ tests/output/render.at \
+ tests/ui/terminal/main.at \
tests/perl-module.at
TESTSUITE = $(srcdir)/tests/testsuite
DISTCLEANFILES += tests/atconfig tests/atlocal $(TESTSUITE)
+AUTOTEST_PATH = tests/data:tests/language/lexer:tests/libpspp:tests/output:src/ui/terminal
-$(srcdir)/tests/testsuite.at: tests/testsuite.in Makefile
+$(srcdir)/tests/testsuite.at: tests/testsuite.in tests/automake.mk
cp $< $@
for t in $(TESTSUITE_AT); do \
echo "m4_include([$$t])" >> $@ ;\
done
-
+EXTRA_DIST += tests/testsuite.at
CHECK_LOCAL += tests_check
tests_check: tests/atconfig tests/atlocal $(TESTSUITE) $(check_PROGRAMS)
- $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=tests/libpspp:tests/output:src/ui/terminal $(TESTSUITEFLAGS)
+ $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH) $(TESTSUITEFLAGS)
CLEAN_LOCAL += tests_clean
tests_clean:
AUTOM4TE = $(SHELL) $(srcdir)/build-aux/missing --run autom4te
AUTOTEST = $(AUTOM4TE) --language=autotest
$(TESTSUITE): package.m4 $(srcdir)/tests/testsuite.at $(TESTSUITE_AT)
- $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
+ $(AUTOTEST) -I '$(srcdir)' $@.at | sed 's/@<00A0>@/ /g' > $@.tmp
mv $@.tmp $@
# The `:;' works around a Bash 3.2 bug when the output is not writeable.
echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])' && \
echo 'm4_define([AT_PACKAGE_URL], [$(PACKAGE_URL)])'; \
} >'$(srcdir)/package.m4'
+\f
+# valgrind support for Autotest testsuite
+
+valgrind_wrappers = \
+ tests/valgrind/datasheet-test \
+ tests/valgrind/command-name-test \
+ tests/valgrind/scan-test \
+ tests/valgrind/segment-test \
+ tests/valgrind/abt-test \
+ tests/valgrind/bt-test \
+ tests/valgrind/encoding-guesser-test \
+ tests/valgrind/heap-test \
+ tests/valgrind/hmap-test \
+ tests/valgrind/hmapx-test \
+ tests/valgrind/i18n-test \
+ tests/valgrind/ll-test \
+ tests/valgrind/llx-test \
+ tests/valgrind/range-map-test \
+ tests/valgrind/range-set-test \
+ tests/valgrind/sparse-array-test \
+ tests/valgrind/sparse-xarray-test \
+ tests/valgrind/str-test \
+ tests/valgrind/string-map-test \
+ tests/valgrind/stringi-map-test \
+ tests/valgrind/string-set-test \
+ tests/valgrind/stringi-set-test \
+ tests/valgrind/tower-test \
+ tests/valgrind/u8-istream-test \
+ tests/valgrind/render-test \
+ tests/valgrind/pspp
+
+$(valgrind_wrappers): tests/valgrind-wrapper.in
+ @test -d tests/valgrind || mkdir tests/valgrind
+ sed -e 's,[@]wrap_program[@],$@,' \
+ $(top_srcdir)/tests/valgrind-wrapper.in > $@.tmp
+ chmod +x $@.tmp
+ mv $@.tmp $@
+CLEANFILES += $(valgrind_wrappers)
+EXTRA_DIST += tests/valgrind-wrapper.in
+
+VALGRIND = $(SHELL) $(abs_top_builddir)/libtool --mode=execute valgrind --log-file=valgrind.%p --leak-check=full --num-callers=20
+check-valgrind: all tests/atconfig tests/atlocal $(TESTSUITE) $(valgrind_wrappers)
+ $(SHELL) '$(TESTSUITE)' -C tests VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS)
+ @echo
+ @echo '--------------------------------'
+ @echo 'Valgrind output is in:'
+ @echo 'tests/testsuite.dir/*/valgrind.*'
+ @echo '--------------------------------'