[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 20/32] test init: refactor: new function 'am_test_setup'
From: |
Stefano Lattarini |
Subject: |
[PATCH 20/32] test init: refactor: new function 'am_test_setup' |
Date: |
Thu, 26 Jul 2012 14:04:46 +0200 |
* 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 <address@hidden>
---
t/ax/test-init.sh | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/t/ax/test-init.sh b/t/ax/test-init.sh
index 9684327..d4232d5 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
--
1.7.12.rc0
- [PATCH 11/32] tests: simplify sourcing of helper shell files, (continued)
- [PATCH 11/32] tests: simplify sourcing of helper shell files, Stefano Lattarini, 2012/07/26
- [PATCH 19/32] test init: refactor: move displaying of debugging info later, Stefano Lattarini, 2012/07/26
- [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 <=
- [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, 2012/07/26
- [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