Merge branch 'test-protocols' into tap-testsuite-work
[platform/upstream/automake.git] / tests / defs-static.in
index 17ed284..407060d 100644 (file)
@@ -70,8 +70,8 @@ fi
 # Check that the environment is properly sanitized.
 # Having variables exported to the empty string is OK, since our code
 # treats such variables as if they were unset.
-for var in me required parallel_tests test_prefer_config_shell \
-           original_AUTOMAKE original_ACLOCAL
+for var in me required use_tap parallel_tests test_prefer_config_shell \
+           original_AUTOMAKE original_ACLOCAL;
 do
   if eval "test x\"\$$var\" != x" && env | grep "^$var=" >/dev/null; then
     echo "$argv0: variable \`$var' is set in the environment:" \
@@ -81,6 +81,13 @@ do
 done
 unset var
 
+# See whether the current test script is expected to use TAP or not.
+# Use a sensible default, while allowing the scripts to override this
+# check.
+if test -z "$using_tap"; then
+  case $argv0 in *.tap) using_tap=yes;; *) using_tap=no;; esac
+fi
+
 testsrcdir='@abs_srcdir@'
 top_testsrcdir='@abs_top_srcdir@'
 testbuilddir='@abs_builddir@'