pass env variable better i think
This commit is contained in:
parent
1f26a67c9e
commit
bf19f94c08
@ -5,4 +5,4 @@
|
||||
|
||||
# Test if $TEST_SHELL, when placed in urchin's environment, is passed through to the test scripts.
|
||||
TEST_SHELL="$PWD/.special-shell" $TEST_SHELL \
|
||||
../../urchin ./.test-TEST_SHELL-passed-through
|
||||
../../urchin --disable-cycling ./.test-TEST_SHELL-passed-through
|
||||
|
17
urchin
17
urchin
@ -144,15 +144,6 @@ recurse() {
|
||||
# Determine the environment variable to define for test scripts
|
||||
# that reflects the specified or implied shell to use for shell-code tests.
|
||||
while read the_test_shell; do
|
||||
if test -z "$the_test_shell"; then
|
||||
# Shell cycling is disabled with -n; use the present value of
|
||||
# TEST_SHELL or default to /bin/sh
|
||||
if [ -n "$TEST_SHELL" ]; then
|
||||
the_test_shell="$TEST_SHELL"
|
||||
else
|
||||
the_test_shell=/bin/sh
|
||||
fi
|
||||
fi
|
||||
(
|
||||
if test -f setup; then . ./setup; fi
|
||||
|
||||
@ -165,7 +156,13 @@ recurse() {
|
||||
TEST_SHELL="$the_test_shell" "$the_test_shell" \
|
||||
"$potential_test"
|
||||
else
|
||||
TEST_SHELL="$the_test_shell" "$potential_test"
|
||||
# Shell cycling is disabled with -n; use the present value of
|
||||
# TEST_SHELL or default to /bin/sh
|
||||
if [ -n "$TEST_SHELL" ]; then
|
||||
"$potential_test"
|
||||
else
|
||||
TEST_SHELL=/bin/sh "$potential_test"
|
||||
fi
|
||||
fi
|
||||
} > "$(stdout_file "$potential_test" "$the_test_shell")" 2>&1
|
||||
exit_code="$?"
|
||||
|
Loading…
Reference in New Issue
Block a user