@@ -231,6 +231,9 @@ override the location of the dashed-form subcommands (what
GIT_EXEC_PATH would be used for during normal operation).
GIT_TEST_EXEC_PATH defaults to `$GIT_TEST_INSTALLED/git --exec-path`.
+Similar to GIT_TEST_INSTALLED, GIT_TEST_BUILD_DIR can be pointed to
+another git.git checkout's build directory, to test its built binaries
+against the tests in this checkout.
Skipping Tests
--------------
@@ -47,6 +47,10 @@ fi
# its build directory.
GIT_SOURCE_DIR="${TEST_DIRECTORY%/t}"
GIT_BUILD_DIR="$GIT_SOURCE_DIR"
+if test -n "$GIT_TEST_BUILD_DIR"
+then
+ GIT_BUILD_DIR="$GIT_TEST_BUILD_DIR"
+fi
if test "$TEST_DIRECTORY" = "$GIT_BUILD_DIR"
then
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 "../". 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) 1. 6720721e152 (test-lib.sh: Allow running the test suite against installed git, 2009-03-16) Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- t/README | 3 +++ t/test-lib.sh | 4 ++++ 2 files changed, 7 insertions(+)