[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 29/32] tests: "am_using_tap=yes" -> "am_test_protocol=tap"
From: |
Stefano Lattarini |
Subject: |
[PATCH 29/32] tests: "am_using_tap=yes" -> "am_test_protocol=tap" |
Date: |
Thu, 26 Jul 2012 14:04:55 +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 <address@hidden>
---
Makefile.am | 2 +-
syntax-checks.mk | 1 +
t/ax/am-test-lib.sh | 4 ++--
t/ax/test-defs.in | 9 ++++++---
t/ax/test-lib.sh | 4 ++--
t/self-check-env-sanitize.tap | 2 +-
t/self-check-tap.sh | 14 +++++++-------
7 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index d255288..61a0443 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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 \
diff --git a/syntax-checks.mk b/syntax-checks.mk
index bcaf50f..3a0d48c 100644
--- a/syntax-checks.mk
+++ b/syntax-checks.mk
@@ -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 \
diff --git a/t/ax/am-test-lib.sh b/t/ax/am-test-lib.sh
index 8a0e117..ee56068 100644
--- a/t/ax/am-test-lib.sh
+++ b/t/ax/am-test-lib.sh
@@ -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"
}
diff --git a/t/ax/test-defs.in b/t/ax/test-defs.in
index 7a03f92..d0063cf 100644
--- a/t/ax/test-defs.in
+++ b/t/ax/test-defs.in
@@ -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@'
diff --git a/t/ax/test-lib.sh b/t/ax/test-lib.sh
index 9a530b1..6048f81 100644
--- a/t/ax/test-lib.sh
+++ b/t/ax/test-lib.sh
@@ -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
diff --git a/t/self-check-env-sanitize.tap b/t/self-check-env-sanitize.tap
index 3e48d89..4896ce2 100755
--- a/t/self-check-env-sanitize.tap
+++ b/t/self-check-env-sanitize.tap
@@ -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
diff --git a/t/self-check-tap.sh b/t/self-check-tap.sh
index 8d84621..47def71 100755
--- a/t/self-check-tap.sh
+++ b/t/self-check-tap.sh
@@ -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
@@ -23,23 +23,23 @@
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
:
--
1.7.12.rc0
- [PATCH 16/32] configure: testsuite shell set exit traps in shell functions, (continued)
- [PATCH 16/32] configure: testsuite shell set exit traps in shell functions, Stefano Lattarini, 2012/07/26
- [PATCH 21/32] test setup: merge definitions of function for simple tests, Stefano Lattarini, 2012/07/26
- [PATCH 23/32] tests: split test libs into "generic" and "automake-specific", Stefano Lattarini, 2012/07/26
- [PATCH 27/32] configure: testsuite shell can return early from "dot-sourced" files, Stefano Lattarini, 2012/07/26
- [PATCH 25/32] tests: source test defs in the generic test lib, Stefano Lattarini, 2012/07/26
- [PATCH 22/32] test setup: move actual calling of testsuite setup in ./defs, Stefano Lattarini, 2012/07/26
- [PATCH 26/32] tests: move sanitization and "Bournification" in the generic test lib, Stefano Lattarini, 2012/07/26
- [PATCH 24/32] test defs: no need to re-add $srcdir/t/ax to $PATH, Stefano Lattarini, 2012/07/26
- [PATCH 20/32] test init: refactor: new function 'am_test_setup', Stefano Lattarini, 2012/07/26
- [PATCH 28/32] tests: protect test libs against multiple inclusion, Stefano Lattarini, 2012/07/26
- [PATCH 29/32] tests: "am_using_tap=yes" -> "am_test_protocol=tap",
Stefano Lattarini <=
- [PATCH 31/32] runtest: sanitize test environment, Stefano Lattarini, 2012/07/26
- [PATCH 30/32] tests: remove an obsolescent self test, Stefano Lattarini, 2012/07/26
- [PATCH 32/32] tests: never source test-defs.sh directly, source test-lib.sh instead, Stefano Lattarini, 2012/07/26
- [PATCH 33/32] maintcheck: fixup list of files in $(xdefs), Stefano Lattarini, 2012/07/26
- Re: [PATCH 00/32] {maint} Several testsuite refactorings, Stefano Lattarini, 2012/07/26