summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2021-07-24 22:06:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-07-26 19:17:16 (GMT)
commitb7d11a0f5d2db1eff623150cdc2a2ddccd6845b3 (patch)
tree0247f39584741aa72ac932c0053cf11b71c8496b /Makefile
parentebf3c04b262aa27fbb97f8a0156c2347fecafafb (diff)
downloadgit-b7d11a0f5d2db1eff623150cdc2a2ddccd6845b3.zip
git-b7d11a0f5d2db1eff623150cdc2a2ddccd6845b3.tar.gz
git-b7d11a0f5d2db1eff623150cdc2a2ddccd6845b3.tar.bz2
tests: exercise the RUNTIME_PREFIX feature
Originally, we refrained from adding a regression test in 7b6c6496374 (system_path(): Add prefix computation at runtime if RUNTIME_PREFIX set, 2008-08-10), and in 226c0ddd0d6 (exec_cmd: RUNTIME_PREFIX on some POSIX systems, 2018-04-10). The reason was that it was deemed too tricky to test. Turns out that it is not tricky to test at all: we simply create a pseudo-root, copy the `git` executable into the `git/` subdirectory of that pseudo-root, then copy a script into the `libexec/git-core/` directory and expect that to be picked up. As long as the trash directory is in a location where binaries can be executed, this works. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index c3565fc..4c3e4cc 100644
--- a/Makefile
+++ b/Makefile
@@ -2827,6 +2827,11 @@ endif
ifdef GIT_TEST_PERL_FATAL_WARNINGS
@echo GIT_TEST_PERL_FATAL_WARNINGS=\''$(subst ','\'',$(subst ','\'',$(GIT_TEST_PERL_FATAL_WARNINGS)))'\' >>$@+
endif
+ifdef RUNTIME_PREFIX
+ @echo RUNTIME_PREFIX=\'true\' >>$@+
+else
+ @echo RUNTIME_PREFIX=\'false\' >>$@+
+endif
@if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi
### Detect Python interpreter path changes