Re: [RFC PATCH 20/21] t: allow overriding build dir
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Oct 8, 2024, 14:23 UTC
- Message-ID
- <ZwVAaZwunBCwbD0V@pks.im>
- In-Reply-To
- <9272f2bf-cb5b-4b1b-975e-a7340dd5c48a@gmail.com>
On Tue, Oct 08, 2024 at 03:04:33PM +0100, Phillip Wood wrote:
Show 14 quoted lines
> Hi Patrick > > On 02/10/2024 16:16, Patrick Steinhardt wrote: > > Our "test-lib.sh" assumes that our build directory is the parent > > directory of "t/". While true when using our Makefile, it's not when > > using build systems that support out-of-tree builds. > > > > Allow such build systems to override the location of the build directory > > with an environment variable. > > ee9e66e4e76 (cmake: avoid editing t/test-lib.sh, 2022-10-18) added support > for reading the "real" build directory from "$GIT_BUILD_DIR/GIT-BUILD-DIR". > Using an environment variable is fine when running the tests from the build > system but it is a pain to have to set it when running them manually.
That doesn't quite solve the problem though, because "$GIT_BUILD_DIR" points to the _source_ directory as noted in the mentioned commit. So the resulting build is still not fully self-contained. So I don't currently see another way than to introduce a separate environment variable.
Patrick