summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-02-01 14:43:59 +1100
committerNeilBrown <neilb@suse.de>2011-02-01 14:43:59 +1100
commit3cdcfda4b0d0f1cd94ab1d7e287765c82f15d4e4 (patch)
tree13f4938f23efb8ea5f3d316d5b74b258bfddffac /test
parente5e5d7cea390fd33d6be09ee6d8a47bc7695eb50 (diff)
downloadmdadm-3cdcfda4b0d0f1cd94ab1d7e287765c82f15d4e4.tar.gz
test: remove all the environment handling.
Instead, just include the environ explicitly in the test file or, where shared, source the shared file. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'test')
-rwxr-xr-xtest19
1 files changed, 0 insertions, 19 deletions
diff --git a/test b/test
index 277f94a..cbca4d1 100755
--- a/test
+++ b/test
@@ -197,21 +197,6 @@ rotest() {
fsck -fn $dev >&2
}
-setup_environment() {
- if [ -f $1 ]; then
- . $environment
- setup_env
- fi
-}
-
-reset_environment() {
- if [ -f $1 ]; then
- reset_env
- unset setup_env
- unset reset_env
- fi
-}
-
for script in tests/$prefix tests/$prefix*[^~]
do
if [ -f "$script" ]
@@ -221,18 +206,14 @@ do
$mdadm -Ssq 2> /dev/null
mdadm --zero $devlist 2> /dev/null
mdadm --zero $devlist 2> /dev/null
- environment="tests/env-`basename $script`"
- setup_environment $environment
# source script in a subshell, so it has access to our
# namespace, but cannot change it.
echo -ne "$script... "
if ( set -ex ; . $script ) 2> $targetdir/log
then echo "succeeded"
else echo "FAILED"
- reset_environment $environment
exit 1
fi
- reset_environment $environment
fi
done
exit 0