git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C HamanoNext: Avery Pennarun
Message 15 of 28 in “git-subtree Ready #2”
  1. David A. GreeneFeb 11, 2012
  2. Junio C HamanoFeb 11, 2012
  3. David A. GreeneFeb 11, 2012
  4. David A. GreeneFeb 15, 2012
  5. Jeff KingFeb 15, 2012
  6. David A. GreeneFeb 15, 2012
  7. David A. GreeneFeb 16, 2012
  8. David A. GreeneFeb 20, 2012
  9. Jeff KingFeb 20, 2012
  10. Junio C HamanoFeb 20, 2012
  11. David A. GreeneFeb 21, 2012
  12. Junio C HamanoFeb 21, 2012
  13. Junio C HamanoFeb 21, 2012
  14. Junio C HamanoFeb 21, 2012
  15. Thomas RastFeb 21, 2012
  16. Avery PennarunFeb 24, 2012
  17. Junio C HamanoFeb 24, 2012
  18. Avery PennarunFeb 24, 2012
  19. David A. GreeneFeb 25, 2012
  20. Junio C HamanoFeb 25, 2012
  21. David A. GreeneFeb 25, 2012
  22. Junio C HamanoFeb 27, 2012
  23. Jeff KingFeb 27, 2012
  24. Jeff KingFeb 27, 2012
  25. Jakub NarebskiFeb 28, 2012
  26. Avery PennarunFeb 28, 2012
  27. David A. GreeneMar 2, 2012
  28. David A. GreeneFeb 21, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.