tests: Make it harder to run the testsuite outside of "make check".
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 4 Dec 2024 22:28:31 +0000 (14:28 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Wed, 4 Dec 2024 22:28:31 +0000 (14:28 -0800)
This confused a user.

tests/README [new file with mode: 0644]
tests/automake.mk
tests/testsuite.in

diff --git a/tests/README b/tests/README
new file mode 100644 (file)
index 0000000..1353aa8
--- /dev/null
@@ -0,0 +1,2 @@
+This directory contains PSPP self-tests.  To run them, run "make
+check" in the top-level directory.
\ No newline at end of file
index eb5698738de942792af1a291d1303ccbfa5786aa..a33e97f35d7ee5182bd496ef6b59748033da6d30 100644 (file)
@@ -278,6 +278,7 @@ tests_output_tex_strings_CFLAGS = $(AM_CFLAGS) -I $(top_srcdir)/src/output
 
 
 EXTRA_DIST += \
+       tests/README \
        tests/coverage.sh \
        tests/data/repeating-2.ods \
        tests/data/simple.ods \
index 43d8ce4ccb94b816b9a27c06e20bd6bd8ed8168b..f2168ba293e1d056d6884cc3884e1410c99602b5 100644 (file)
@@ -26,6 +26,11 @@ m4_ifndef([AT_SKIP_IF],
 && exit 77 || exit 0], [0], [ignore], [ignore])])])
 
 m4_divert_text([PREPARE_TESTS], [dnl
+if test -z "$RUNNER" && test -z "$AUTOTEST_PATH"; then
+    echo >&2 "Use \"make check\" to run the testsuite."
+    exit 1
+fi
+
 if test X"$RUNNER" != X; then
     wrapper_dir=`pwd`/wrappers
     rm -f "$wrapper_dir"/*