Merge branch 'rr/test-use-shell-path-not-shell' into maint
* rr/test-use-shell-path-not-shell: test-lib: use $SHELL_PATH, not $SHELL
This commit is contained in:
commit
ff3ec8a9a2
@ -15,22 +15,6 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see http://www.gnu.org/licenses/ .
|
# along with this program. If not, see http://www.gnu.org/licenses/ .
|
||||||
|
|
||||||
# if --tee was passed, write the output not only to the terminal, but
|
|
||||||
# additionally to the file test-results/$BASENAME.out, too.
|
|
||||||
case "$GIT_TEST_TEE_STARTED, $* " in
|
|
||||||
done,*)
|
|
||||||
# do not redirect again
|
|
||||||
;;
|
|
||||||
*' --tee '*|*' --va'*)
|
|
||||||
mkdir -p test-results
|
|
||||||
BASE=test-results/$(basename "$0" .sh)
|
|
||||||
(GIT_TEST_TEE_STARTED=done ${SHELL-sh} "$0" "$@" 2>&1;
|
|
||||||
echo $? > $BASE.exit) | tee $BASE.out
|
|
||||||
test "$(cat $BASE.exit)" = 0
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Keep the original TERM for say_color
|
# Keep the original TERM for say_color
|
||||||
ORIGINAL_TERM=$TERM
|
ORIGINAL_TERM=$TERM
|
||||||
|
|
||||||
@ -63,6 +47,22 @@ fi
|
|||||||
. "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS
|
. "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS
|
||||||
export PERL_PATH SHELL_PATH
|
export PERL_PATH SHELL_PATH
|
||||||
|
|
||||||
|
# if --tee was passed, write the output not only to the terminal, but
|
||||||
|
# additionally to the file test-results/$BASENAME.out, too.
|
||||||
|
case "$GIT_TEST_TEE_STARTED, $* " in
|
||||||
|
done,*)
|
||||||
|
# do not redirect again
|
||||||
|
;;
|
||||||
|
*' --tee '*|*' --va'*)
|
||||||
|
mkdir -p test-results
|
||||||
|
BASE=test-results/$(basename "$0" .sh)
|
||||||
|
(GIT_TEST_TEE_STARTED=done ${SHELL_PATH} "$0" "$@" 2>&1;
|
||||||
|
echo $? > $BASE.exit) | tee $BASE.out
|
||||||
|
test "$(cat $BASE.exit)" = 0
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# For repeatability, reset the environment to known value.
|
# For repeatability, reset the environment to known value.
|
||||||
LANG=C
|
LANG=C
|
||||||
LC_ALL=C
|
LC_ALL=C
|
||||||
|
Loading…
Reference in New Issue
Block a user