Re: git-subtree Ready #2
From: Thomas Rast <hidden>
Date: 2016-06-15 22:53:06
greened@obbligato.org (David A. Greene) writes:
quoted
-GIT_BUILD_DIR="$TEST_DIRECTORY"/.. + +if test -z "$GIT_BUILD_DIR" +then + echo Here + # We allow tests to override this, in case they want to run tests + # outside of t/, e.g. for running tests on the test library + # itself. + GIT_BUILD_DIR="$TEST_DIRECTORY"/.. +fiI'll put a patch together with a more extensive explanation. Basically, tests run outside of the top-level t/ directory don't work because there are all sort of assumptions in test-lib.sh about where they live. There are comments in test-lib.sh indicating that it should support tests in other directories but I could not make it work out of the box.
Note that this will conflict with tr/perftest, which is already in next.
It had a similar override, but then made do with the existing
GIT_TEST_INSTALLED facility. I think you do need the above here,
because you are not sourcing test-lib from the directory where the test
lives. It may then be cleaner to again use GIT_BUILD_DIR in
t/perf/perf-lib.sh since it does not require knowledge (outside of
test-lib) that $GIT_BUILD_DIR/bin-wrappers/ holds the binaries.
--
Thomas Rast
trast@{inf,student}.ethz.ch