diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-10-27 16:41:39 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-10-27 16:44:28 +0200 |
commit | 5ddf10071d94acf2ae0e69e187641f22cce0199a (patch) | |
tree | 94029981e22ecf064ed4a18051ce4c80771226f1 /t/self-check-me.tap | |
parent | f897907bee30ec66fdebfe04d3c2d6ad8b8da501 (diff) | |
download | automake-5ddf10071d94acf2ae0e69e187641f22cce0199a.tar.gz |
tests: prefer including 'test-init.sh' rather than './defs'
This is a follow-up to today's commit v1.12.4-22-g0610fc8,
"tests: prepare to move ./defs to t/ax/test-init.sh"
* All tests: To run the common setup, use the command:
. test-init.sh
instead of the older, "historical" one:
. ./defs || exit 1
Note that the "|| exit 1" wasn't really useful, since the 'errexit'
shell flag is in effect in both './defs' and 'test-init.sh', and all
the known shells that are good enough to run the automake testsuite
do automatically exit with error when a sourced file cannot be found
(at least, they do so in non-interactive mode, which is the only
mode that concerns us in the testsuite).
* t/ax/tap-summary-aux.sh, t/ax/testsuite-summary-checks.sh: Likewise.
* gen-testsuite-part: Do the same in the generated tests.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/self-check-me.tap')
-rwxr-xr-x | t/self-check-me.tap | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/self-check-me.tap b/t/self-check-me.tap index 9c3125ee7..c76a0e11b 100755 --- a/t/self-check-me.tap +++ b/t/self-check-me.tap @@ -18,7 +18,7 @@ # Make sure that $me gets automatically defined by './defs'. am_create_testdir=no -. ./defs || exit 1 +. test-init.sh plan_ 12 @@ -31,7 +31,7 @@ do_check () { $AM_TEST_RUNNER_SHELL -c ' am_create_testdir=no # Do not pollute the top-level directory. - . ./defs + . test-init.sh echo me=$me ' "$1" | grep "^me=$2$" command_ok_ "me=$1" test $? -eq 0 @@ -52,7 +52,7 @@ do_check abc. 'abc\.' s=$(me=bad $AM_TEST_RUNNER_SHELL -c ' # Do not pollute the top-level directory. am_create_testdir=no - . ./defs + . test-init.sh echo me=$me ' foo.sh) command_ok_ "override of \$me before ./defs causes no error" \ |