tests: source test defs in the generic test lib
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 26 Jul 2012 08:09:04 +0000 (10:09 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 26 Jul 2012 12:11:38 +0000 (14:11 +0200)
* t/ax/test-lib.sh: That is, here ...
* defs: ... rather than here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
defs
t/ax/test-lib.sh

diff --git a/defs b/defs
index ea6c84c..1ee1116 100644 (file)
--- a/defs
+++ b/defs
@@ -17,9 +17,6 @@
 
 set -e
 
-# Source the shell static setup and variable definitions.
-. test-defs.sh; test $? -eq 0 || exit 99
-
 # Source the actual code for test initialization and setup.
 . test-lib.sh
 . am-test-lib.sh
index 1efcaa9..f711f1e 100644 (file)
@@ -31,6 +31,11 @@ nl='
 # is defined initially, so that saving and restoring $IFS works.
 IFS=$sp$tab$nl
 
+# Source extra configuration.
+. test-defs.sh
+# And fail hard if something went wrong.
+test $? -eq 0 || exit 99
+
 # We use a trap below for cleanup.  This requires us to go through
 # hoops to get the right exit status transported through the signal.
 # Turn off errexit here so that we don't trip the bug with OSF1/Tru64