Skip to content

Commit e87aa68

Browse files
committed
test-lib.sh: make $GIT_BUILD_DIR an absolute path
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>
1 parent f932cb8 commit e87aa68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/test-lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ then
3434
# elsewhere
3535
TEST_OUTPUT_DIRECTORY=$TEST_DIRECTORY
3636
fi
37-
GIT_BUILD_DIR="$TEST_DIRECTORY"/..
37+
GIT_BUILD_DIR="${TEST_DIRECTORY%/t}"
3838

3939
# Prepend a string to a VAR using an arbitrary ":" delimiter, not
4040
# adding the delimiter if VAR is empty. I.e. a generalized:

0 commit comments

Comments
 (0)