Merge branch 'ps/t0000-output-directory-fix'

"TEST_OUTPUT_DIRECTORY=there make test" failed to work, which has
been corrected.

* ps/t0000-output-directory-fix:
  t0000: fix test if run with TEST_OUTPUT_DIRECTORY
This commit is contained in:
Junio C Hamano 2021-07-28 13:18:04 -07:00
Родитель 7f554a4f69 ade1552598
Коммит 1d07640b65
2 изменённых файлов: 14 добавлений и 2 удалений

Просмотреть файл

@ -106,8 +106,11 @@ _run_sub_test_lib_test_common () {
EOF
cat >>"$name.sh" &&
export TEST_DIRECTORY &&
TEST_OUTPUT_DIRECTORY=$(pwd) &&
export TEST_OUTPUT_DIRECTORY &&
# The child test re-sources GIT-BUILD-OPTIONS and may thus
# override the test output directory. We thus pass it as an
# explicit override to the child.
TEST_OUTPUT_DIRECTORY_OVERRIDE=$(pwd) &&
export TEST_OUTPUT_DIRECTORY_OVERRIDE &&
GIT_SKIP_TESTS=$skip &&
export GIT_SKIP_TESTS &&
sane_unset GIT_TEST_FAIL_PREREQS &&

Просмотреть файл

@ -57,6 +57,15 @@ fi
. "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS
export PERL_PATH SHELL_PATH
# In t0000, we need to override test directories of nested testcases. In case
# the developer has TEST_OUTPUT_DIRECTORY part of his build options, then we'd
# reset this value to instead contain what the developer has specified. We thus
# have this knob to allow overriding the directory.
if test -n "${TEST_OUTPUT_DIRECTORY_OVERRIDE}"
then
TEST_OUTPUT_DIRECTORY="${TEST_OUTPUT_DIRECTORY_OVERRIDE}"
fi
# Disallow the use of abbreviated options in the test suite by default
if test -z "${GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS}"
then