diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-07-26 10:35:09 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-07-26 14:11:39 +0200 |
commit | e82c9156efaf61db57f564f752befa1ac7b8863b (patch) | |
tree | 3226561e02f471de768818fdb5debe0437fd6dbf | |
parent | d8b3c5e4b81986b875f56502006288f43aee5159 (diff) | |
download | automake-e82c9156efaf61db57f564f752befa1ac7b8863b.tar.gz |
tests: "am_using_tap=yes" -> "am_test_protocol=tap"
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>
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | syntax-checks.mk | 1 | ||||
-rw-r--r-- | t/ax/am-test-lib.sh | 4 | ||||
-rw-r--r-- | t/ax/test-defs.in | 9 | ||||
-rw-r--r-- | t/ax/test-lib.sh | 4 | ||||
-rwxr-xr-x | t/self-check-env-sanitize.tap | 2 | ||||
-rwxr-xr-x | t/self-check-tap.sh | 14 |
7 files changed, 20 insertions, 16 deletions
diff --git a/Makefile.am b/Makefile.am index e55e43de6..6a730199b 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 bcaf50f34..3a0d48c74 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 8a0e11726..ee5606822 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 7a03f9245..d0063cfde 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 9a530b16e..6048f8112 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 3e48d895f..4896ce2a2 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 8d846213f..47def711f 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 : |