Re: git-subtree Ready #2
- From
Thomas Rast <trast@inf.ethz.ch>
- Date
- Feb 21, 2012, 09:07 UTC
- Message-ID
- <87sji4k10f.fsf@thomas.inf.ethz.ch>
- In-Reply-To
- <87ehtowxu7.fsf@smith.obbligato.org>
greened@obbligato.org (David A. Greene) writes:
Show 16 quoted lines
>> -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"/.. >> +fi > > I'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