]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: "am_using_tap=yes" -> "am_test_protocol=tap"
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 26 Jul 2012 08:35:09 +0000 (10:35 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 26 Jul 2012 12:11:39 +0000 (14:11 +0200)
And similarly, "am_using_tap=no" -> "am_test_protocol=none".

The new '$am_test_protocol' name is clearer, and will allow the easy
addition of further test protocols in the future.  This is not truly
relevant for automake, but we are trying to make some parts of our
testsuite framework as general as possible, in view of a future move
to a more generic project like Gnulib.

* Makefile.am, t/ax/am-test-lib.sh, t/ax/test-defs.in, t/ax/test-lib.sh,
t/self-check-env-sanitize.tap, t/self-check-tap.sh: Adjust.
* syntax-checks.mk (sc_tests_obsolete_variables): Add 'am_using_tap' to
the list of obsolete variables to check against.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Makefile.am
syntax-checks.mk
t/ax/am-test-lib.sh
t/ax/test-defs.in
t/ax/test-lib.sh
t/self-check-env-sanitize.tap
t/self-check-tap.sh

index e55e43de6540596b6f9a11f85b6834a4c33bfbed..6a730199b9c6b41cc2918fd47f00e557ccedfe35 100644 (file)
@@ -337,7 +337,7 @@ TESTS = ## Will be updated later.
 AM_TESTS_ENVIRONMENT = \
   for v in \
     required \
-    am_using_tap \
+    am_test_protocol \
     am_serial_tests \
     am_test_prefer_config_shell \
     am_original_AUTOMAKE \
index bcaf50f34292cc7705ea496fdf54b29cca0366a3..3a0d48c7498d0e7512f7e6bd6a6325def6d46d02 100644 (file)
@@ -283,6 +283,7 @@ sc_tests_make_without_am_makeflags:
 sc_tests_obsolete_variables:
        @vars=" \
          using_tap \
+         am_using_tap \
          test_prefer_config_shell \
          original_AUTOMAKE \
          original_ACLOCAL \
index 8a0e11726b01fe9c8f54f9b71f2d2969ffb24f9d..ee5606822ef7a6f369f4ae8090fac330e5bab61a 100644 (file)
@@ -155,7 +155,7 @@ AUTOMAKE_run ()
   $AUTOMAKE ${1+"$@"} >stdout 2>stderr || am__got_rc=$?
   cat stderr >&2
   cat stdout
-  if test $am_using_tap != yes; then
+  if test $am_test_protocol = none; then
     test $am__got_rc -eq $am__exp_rc || exit 1
     return
   fi
@@ -795,6 +795,6 @@ am_setup_testdir ()
 am_extra_info ()
 {
   echo "Running from installcheck: $am_running_installcheck"
-  echo "Using TAP: $am_using_tap"
+  echo "Test Protocol: $am_test_protocol"
   echo "PATH = $PATH"
 }
index 7a03f924534c7be442fed0a45d3913d33ac696ae..d0063cfde42df38524cf19def9731f4630211ebd 100644 (file)
@@ -27,7 +27,7 @@
 # treats such variables as if they were unset.
 for var in \
   required \
-  am_using_tap \
+  am_test_protocol \
   am_serial_tests \
   am_create_testdir \
   am_tap_implementation \
@@ -46,8 +46,11 @@ 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 "$am_using_tap"; then
-  case $argv0 in *.tap) am_using_tap=yes;; *) am_using_tap=no;; esac
+if test -z "$am_test_protocol"; then
+  case $argv0 in
+    *.tap) am_test_protocol=tap;;
+        *) am_test_protocol=none;;
+  esac
 fi
 
 am_rel_srcdir='@srcdir@'
index 9a530b16e5065db66c4685abb8ebc4ad72fb3489..6048f8112d992bcb3cdab04f7aaccfc6949e1791 100644 (file)
@@ -125,7 +125,7 @@ framework_failure_ () { warn_ "$me: set-up failure: $@"; exit 99; }
 # For compatibility with TAP functions.
 skip_all_ () { skip_ "$@"; }
 
-if test $am_using_tap = yes; then
+if test $am_test_protocol = tap; then
   . tap-functions.sh
 fi
 
@@ -220,7 +220,7 @@ am_exit_trap ()
   exit_status=$1
   set +e
   cd "$am_top_builddir"
-  if test $am_using_tap = yes; then
+  if test $am_test_protocol = tap; then
     if test "$planned_" = later && test $exit_status -eq 0; then
       plan_ "now"
     fi
index 3e48d895fe708646d7f64defa4b2347a9c2049f5..4896ce2a2acfe4a3ca0fd7186f9382acb5139c03 100755 (executable)
@@ -29,7 +29,7 @@ plan_ 16 # Two times the number of variable names in $vars.
 vars='
   required
   am_serial_tests
-  am_using_tap
+  am_test_protocol
   am_create_testdir
   am_tap_implementation
   am_test_prefer_config_shell
index 8d846213fa8dc022b8ddc8b9649e439c576da2a2..47def711f3f7aab64e980b4a80fadf8036fbb0c6 100755 (executable)
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Sanity check for the automake testsuite.
-# Make sure that '$am_using_tap' gets automatically defined by
+# Make sure that '$am_test_protocol' gets automatically defined by
 # 'test-defs.sh', but can be overridden by the individual tests.
 
 . test-defs.sh
 set -ex
 
 $AM_TEST_RUNNER_SHELL -c \
-  ". test-defs.sh && test \$am_using_tap = yes" foo.tap
+  ". test-defs.sh && test \$am_test_protocol = tap" foo.tap
 
 for name in foo.test tap tap.test foo-tap; do
   $AM_TEST_RUNNER_SHELL -c \
-    ". test-defs.sh && test \$am_using_tap = no" $name
+    ". test-defs.sh && test \$am_test_protocol = none" $name
 done
 
 $AM_TEST_RUNNER_SHELL -c "
-  am_using_tap=no
+  am_test_protocol=none
   . test-defs.sh
-  test \$am_using_tap = no
+  test \$am_test_protocol = none
 " foo.tap
 
 $AM_TEST_RUNNER_SHELL -c "
-  am_using_tap=yes
+  am_test_protocol=tap
   . test-defs.sh
-  test \$am_using_tap = yes
+  test \$am_test_protocol = tap
 " foo.test
 
 :