]> git.ipfire.org Git - thirdparty/git.git/commit
t: better support for out-of-tree builds
authorPatrick Steinhardt <ps@pks.im>
Fri, 6 Dec 2024 13:24:56 +0000 (14:24 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 6 Dec 2024 22:52:13 +0000 (07:52 +0900)
commit7e0730c8baaac43fcf0366e686066ec2c1fc2f31
tree25b96b725030fe7bb6c88b3fd67f6824c965f438
parent023c3370ac330760aaf399cf6f6d9dbd7350e8e5
t: better support for out-of-tree builds

Our in-tree builds used by the Makefile use various different build
directories scattered around different locations. The paths to those
build directories have to be propagated to our tests such that they can
find the contained files. This is done via a mixture of hardcoded paths
in our test library and injected variables in our bin-wrappers or
"GIT-BUILD-OPTIONS".

The latter two mechanisms are preferable over using hardcoded paths. For
one, we have all paths which are subject to change stored in a small set
of central files instead of having the knowledge of build paths in many
files. And second, it allows build systems which build files elsewhere
to adapt those paths based on their own needs. This is especially nice
in the context of build systems that use out-of-tree builds like CMake
or Meson.

Remove hardcoded knowledge of build paths from our test library and move
it into our bin-wrappers and "GIT-BUILD-OPTIONS".

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
GIT-BUILD-OPTIONS.in
Makefile
bin-wrappers/wrap-for-bin.sh
contrib/buildsystems/CMakeLists.txt
t/lib-gettext.sh
t/t7609-mergetool--lib.sh
t/test-lib.sh