[PATCH 2/4] test-lib: make $GIT_BUILD_DIR an absolute path
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Feb 18, 2022, 21:01 UTC
- Message-ID
- <patch-2.4-4c53c6157ac-20220218T205753Z-avarab@gmail.com>
- In-Reply-To
- <cover-0.4-00000000000-20220218T205753Z-avarab@gmail.com>
Change the GIT_BUILD_DIR from a path like "/path/to/build/t/.." to "/path/to/build". The "TEST_DIRECTORY" here is already made an absolute path a few lines above this.
This will be helpful to LSAN_OPTIONS which will want to strip the build directory path from filenames, which we couldn't do if we had a "/.." in there.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- t/test-lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh index 3212966a82f..4f523b82ce5 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -34,7 +34,7 @@ then # elsewhere TEST_OUTPUT_DIRECTORY=$TEST_DIRECTORY fi -GIT_BUILD_DIR="$TEST_DIRECTORY"/.. +GIT_BUILD_DIR="${TEST_DIRECTORY%/t}" # Prepend a string to a VAR using an arbitrary ":" delimiter, not # adding the delimiter if VAR is empty. I.e. a generalized:
-- 2.35.1.1031.g277d4562d2e