Re: [PATCH v5 09/15] test-lib.sh: support a "GIT_TEST_BUILD_DIR"
On Fri, Dec 2, 2022 at 6:28 AM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
> Compliment the existing GIT_TEST_INSTALLED variable added in [1] with
> one that allows for testing a git built in a directory that's not
> "../".
Show 19 quoted lines
> Instead of "test this installed git" ("GIT_TEST_INSTALLED"), this new
> "GIT_TEST_BUILD_DIR" is a "test this built directory over
> there". E.g. this will pass all tests:
>
> git clone --depth=1 https://github.com/git/git.git git1
> cp -R git1 git2
> make -C git1
> [apply this change to git2]
> (cd git2 && GIT_TEST_BUILD_DIR="$PWD/../git1" make -C t prove)
>
> This facility and file-based instructions to have the test suite use
> another build directory[2] are mutually exclusive. In a subsequent
> commit we'll make CMake and CTest optionally prefer this method.
>
> 1. 6720721e152 (test-lib.sh: Allow running the test suite against
> installed git, 2009-03-16)
> 2. 350a005e366 (cmake: avoid editing t/test-lib.sh, 2022-10-18)
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>