Merge commit 'origin/stable'
[pspp-builds.git] / tests / automake.mk
index ce528a24c5532c94c19949a4aa4288e2cae09ddc..15e297a0150209c1586636de126a7a92a5d8defe 100644 (file)
@@ -1,14 +1,23 @@
 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
 
 TESTS_ENVIRONMENT = top_srcdir='$(top_srcdir)' top_builddir='$(top_builddir)'
-TESTS_ENVIRONMENT += PERL='@PERL@'
-TESTS = \
+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
+
+dist_TESTS = \
+       tests/command/add-files.sh \
        tests/command/aggregate.sh \
+       tests/command/attributes.sh \
        tests/command/autorecod.sh \
        tests/command/beg-data.sh \
        tests/command/bignum.sh \
        tests/command/count.sh \
        tests/command/data-list.sh \
+       tests/command/do-if.sh \
        tests/command/do-repeat.sh \
        tests/command/erase.sh \
        tests/command/examine.sh \
@@ -18,8 +27,13 @@ TESTS = \
        tests/command/file-handle.sh \
        tests/command/filter.sh \
        tests/command/flip.sh \
+       tests/command/get-data-txt.sh \
+       tests/command/get-data-txt-examples.sh \
+       tests/command/get-data-txt-importcases.sh \
        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 \
@@ -27,6 +41,10 @@ TESTS = \
        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/oneway.sh \
        tests/command/oneway-missing.sh \
        tests/command/oneway-with-splits.sh \
@@ -36,6 +54,10 @@ TESTS = \
        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 \
@@ -54,32 +76,54 @@ TESTS = \
        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/agg_crash.sh \
        tests/bugs/agg-crash-2.sh \
        tests/bugs/alpha-freq.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/compute-fmt.sh \
        tests/bugs/compression.sh \
        tests/bugs/crosstabs.sh \
+       tests/bugs/crosstabs2.sh \
        tests/bugs/crosstabs-crash.sh \
+       tests/bugs/crosstabs-crash2.sh \
        tests/bugs/curtailed.sh \
        tests/bugs/data-crash.sh \
        tests/bugs/double-frequency.sh \
+       tests/bugs/empty-do-repeat.sh \
        tests/bugs/get.sh \
+       tests/bugs/examine-crash.sh \
+       tests/bugs/examine-crash2.sh \
+       tests/bugs/examine-crash3.sh \
        tests/bugs/examine-1sample.sh \
        tests/bugs/examine-missing.sh \
+       tests/bugs/examine-missing2.sh \
+       tests/bugs/freq-nolabels.sh \
        tests/bugs/get-no-file.sh \
        tests/bugs/html-frequency.sh \
        tests/bugs/if_crash.sh \
@@ -88,22 +132,33 @@ TESTS = \
        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/piechart.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/recode-copy-bug.sh \
        tests/bugs/computebug.sh \
        tests/bugs/compute-lv.sh \
+       tests/bugs/compute-sum.sh \
        tests/bugs/temp-freq.sh \
        tests/bugs/print-crash.sh \
        tests/bugs/keep-all.sh \
-       tests/xforms/casefile.sh \
+       tests/data/datasheet-test.sh \
+       tests/libpspp/sparse-xarray-test.sh \
+       tests/output/paper-size.sh \
+       tests/xforms/recode.sh \
        tests/stats/descript-basic.sh \
        tests/stats/descript-missing.sh \
        tests/stats/descript-mean-bug.sh \
@@ -114,18 +169,50 @@ TESTS = \
        tests/expressions/expressions.sh \
        tests/expressions/epoch.sh \
        tests/expressions/randist.sh \
+       tests/expressions/valuelabel.sh \
        tests/expressions/variables.sh \
-       tests/expressions/vectors.sh \
+       tests/expressions/vectors.sh
+
+if GNM_SUPPORT
+dist_TESTS += tests/command/get-data-gnm.sh 
+endif
+
+if PSQL_SUPPORT
+dist_TESTS += tests/command/get-data-psql.sh 
+endif
+
+nodist_TESTS = \
+       tests/libpspp/abt-test \
+       tests/libpspp/bt-test \
+       tests/libpspp/heap-test \
+       tests/libpspp/hmap-test \
+       tests/libpspp/hmapx-test \
        tests/libpspp/ll-test \
-       tests/libpspp/llx-test
+       tests/libpspp/llx-test \
+       tests/libpspp/range-map-test \
+       tests/libpspp/range-set-test \
+       tests/libpspp/sparse-array-test \
+       tests/libpspp/str-test \
+       tests/libpspp/tower-test
 
-check_PROGRAMS += tests/libpspp/ll-test tests/libpspp/llx-test \
-       tests/formats/inexactify
+TESTS = $(dist_TESTS) $(nodist_TESTS)
+
+check_PROGRAMS += \
+       $(nodist_TESTS) \
+       tests/data/datasheet-test \
+       tests/formats/inexactify \
+       tests/libpspp/sparse-xarray-test
+
+tests_data_datasheet_test_SOURCES = \
+       tests/data/datasheet-test.c
+tests_data_datasheet_test_LDADD = src/libpspp-core.la @LIBINTL@ 
 
 tests_libpspp_ll_test_SOURCES = \
        src/libpspp/ll.c \
        src/libpspp/ll.h \
        tests/libpspp/ll-test.c
+tests_libpspp_ll_test_LDADD = gl/libgl.la @LIBINTL@
+tests_libpspp_ll_test_CFLAGS = $(AM_CFLAGS)
 
 tests_libpspp_llx_test_SOURCES = \
        src/libpspp/ll.c \
@@ -133,10 +220,121 @@ tests_libpspp_llx_test_SOURCES = \
        src/libpspp/llx.c \
        src/libpspp/llx.h \
        tests/libpspp/llx-test.c
+tests_libpspp_llx_test_LDADD = gl/libgl.la @LIBINTL@
+tests_libpspp_llx_test_CFLAGS = $(AM_CFLAGS)
+
+tests_libpspp_heap_test_SOURCES = \
+       src/libpspp/heap.c \
+       src/libpspp/heap.h \
+       src/libpspp/pool.c \
+       src/libpspp/pool.h \
+       tests/libpspp/heap-test.c
+tests_libpspp_heap_test_LDADD = gl/libgl.la @LIBINTL@ 
+tests_libpspp_heap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
+
+tests_libpspp_hmap_test_SOURCES = \
+       src/libpspp/hmap.c \
+       src/libpspp/hmap.h \
+       tests/libpspp/hmap-test.c
+tests_libpspp_hmap_test_LDADD = gl/libgl.la @LIBINTL@
+tests_libpspp_hmap_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
+
+tests_libpspp_hmapx_test_SOURCES = \
+       src/libpspp/hmap.c \
+       src/libpspp/hmap.h \
+       src/libpspp/hmapx.c \
+       src/libpspp/hmapx.h \
+       tests/libpspp/hmapx-test.c
+tests_libpspp_hmapx_test_LDADD = gl/libgl.la @LIBINTL@
+tests_libpspp_hmapx_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
+
+tests_libpspp_abt_test_SOURCES = \
+       src/libpspp/abt.c \
+       src/libpspp/abt.h \
+       tests/libpspp/abt-test.c
+tests_libpspp_abt_test_LDADD = gl/libgl.la @LIBINTL@
+tests_libpspp_abt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
+
+tests_libpspp_bt_test_SOURCES = \
+       src/libpspp/bt.c \
+       src/libpspp/bt.h \
+       tests/libpspp/bt-test.c
+tests_libpspp_bt_test_LDADD = gl/libgl.la
+tests_libpspp_bt_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
+
+tests_libpspp_range_map_test_SOURCES = \
+       src/libpspp/bt.c \
+       src/libpspp/bt.h \
+       src/libpspp/range-map.c \
+       src/libpspp/range-map.h \
+       tests/libpspp/range-map-test.c
+tests_libpspp_range_map_test_LDADD = gl/libgl.la @LIBINTL@
+tests_libpspp_range_map_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
+
+tests_libpspp_range_set_test_SOURCES = \
+       src/libpspp/bt.c \
+       src/libpspp/bt.h \
+       src/libpspp/pool.c \
+       src/libpspp/pool.h \
+       src/libpspp/range-set.c \
+       src/libpspp/range-set.h \
+       tests/libpspp/range-set-test.c
+tests_libpspp_range_set_test_LDADD = gl/libgl.la @LIBINTL@ 
+tests_libpspp_range_set_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
+
+tests_libpspp_str_test_SOURCES = \
+       tests/libpspp/str-test.c
+tests_libpspp_str_test_LDADD = src/libpspp/libpspp.la gl/libgl.la @LIBINTL@ 
+
+tests_libpspp_tower_test_SOURCES = \
+       src/libpspp/abt.c \
+       src/libpspp/abt.h \
+       src/libpspp/pool.c \
+       src/libpspp/pool.h \
+       src/libpspp/tower.c \
+       src/libpspp/tower.h \
+       tests/libpspp/tower-test.c
+tests_libpspp_tower_test_LDADD = gl/libgl.la @LIBINTL@ 
+tests_libpspp_tower_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
+
+tests_libpspp_sparse_array_test_SOURCES = \
+       src/libpspp/sparse-array.c \
+       src/libpspp/sparse-array.h \
+       src/libpspp/pool.c \
+       src/libpspp/pool.h \
+       tests/libpspp/sparse-array-test.c
+tests_libpspp_sparse_array_test_LDADD = gl/libgl.la @LIBINTL@ 
+tests_libpspp_sparse_array_test_CPPFLAGS = $(AM_CPPFLAGS) -DASSERT_LEVEL=10
+
+tests_libpspp_sparse_xarray_test_SOURCES = \
+       src/libpspp/argv-parser.c \
+       src/libpspp/bt.c \
+       src/libpspp/deque.c \
+       src/libpspp/model-checker.c \
+       src/libpspp/range-set.c \
+       src/libpspp/sparse-array.c \
+       src/libpspp/sparse-xarray.c \
+       src/libpspp/str.c \
+       src/libpspp/pool.c \
+       src/libpspp/tmpfile.c \
+       tests/libpspp/sparse-xarray-test.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
 
-EXTRA_DIST += $(TESTS) tests/weighting.data tests/data-list.data tests/list.data \
+noinst_PROGRAMS += tests/dissect-sysfile
+tests_dissect_sysfile_SOURCES = \
+       src/libpspp/integer-format.c \
+       src/libpspp/float-format.c \
+       tests/dissect-sysfile.c
+tests_dissect_sysfile_LDADD = gl/libgl.la @LIBINTL@ 
+tests_dissect_sysfile_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
+
+EXTRA_DIST += \
+       $(dist_TESTS) \
+        tests/Book1.gnm.unzipped \
+       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 \
@@ -159,7 +357,26 @@ EXTRA_DIST += $(TESTS) tests/weighting.data tests/data-list.data tests/list.data
        tests/expressions/randist/randist.txt \
        tests/expressions/randist/t.out \
        tests/expressions/randist/uniform.out \
-       tests/expressions/randist/weibull.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
 
 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