From: Stefano Lattarini Date: Wed, 25 Jul 2012 18:31:47 +0000 (+0200) Subject: test init: refactor: new function 'am_test_setup' X-Git-Tag: v1.12.3~31^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=472e4e4708f841967623708898050de5d7c27eda;p=thirdparty%2Fautomake.git test init: refactor: new function 'am_test_setup' * t/ax/test-init.sh (am_test_setup): Here. Call it from the main code. Remove other calls of functions and settings that are now duly called by 'am_test_setup'. Signed-off-by: Stefano Lattarini --- diff --git a/t/ax/test-init.sh b/t/ax/test-init.sh index 9684327e2..d4232d563 100644 --- a/t/ax/test-init.sh +++ b/t/ax/test-init.sh @@ -878,8 +878,6 @@ process_requirements () esac } -process_requirements $required - ## ---------------------------------------------------------------- ## ## Create and set up of the temporary directory used by the test. ## ## Set up of the exit trap for cleanup of said directory. ## @@ -955,8 +953,6 @@ am_set_exit_traps () trap "trap '' 13; fatal_ 'caught signal SIGPIPE'" 13 } -am_set_exit_traps - am_setup_testdir () { # The subdirectory where the current test script will run and write its @@ -995,21 +991,25 @@ am_setup_testdir () fi } -# Create and populate the temporary directory, if and as required. -if test x"$am_create_testdir" = x"no"; then - am_test_subdir= -else - am_setup_testdir -fi - +am_test_setup () +{ + process_requirements $required + am_set_exit_traps + # Create and populate the temporary directory, if required. + if test x"$am_create_testdir" = x"no"; then + am_test_subdir= + else + am_setup_testdir + fi + echo "Running from installcheck: $am_running_installcheck" + echo "Using TAP: $am_using_tap" + echo "PATH = $PATH" + set -x + pwd +} ## ---------------- ## ## Ready to go... ## ## ---------------- ## -echo "Running from installcheck: $am_running_installcheck" -echo "Using TAP: $am_using_tap" -echo "PATH = $PATH" - -set -x -pwd +am_test_setup