diff options
author | NeilBrown <neilb@suse.de> | 2011-02-01 14:43:59 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-02-01 14:43:59 +1100 |
commit | 3cdcfda4b0d0f1cd94ab1d7e287765c82f15d4e4 (patch) | |
tree | 13f4938f23efb8ea5f3d316d5b74b258bfddffac /test | |
parent | e5e5d7cea390fd33d6be09ee6d8a47bc7695eb50 (diff) | |
download | mdadm-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-x | test | 19 |
1 files changed, 0 insertions, 19 deletions
@@ -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 |