summaryrefslogtreecommitdiff
path: root/t/perf/run
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-03-03 07:36:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-03 18:55:27 (GMT)
commit28e1fb54665f6f953ba16f75981195f5aa70f59b (patch)
tree4c302e1f4d044f969697501be939606065b446f2 /t/perf/run
parent83d4a409d370db56b87ce2a2e105f717863878da (diff)
downloadgit-28e1fb54665f6f953ba16f75981195f5aa70f59b.zip
git-28e1fb54665f6f953ba16f75981195f5aa70f59b.tar.gz
git-28e1fb54665f6f953ba16f75981195f5aa70f59b.tar.bz2
t/perf: add fallback for pre-bin-wrappers versions of git
It's tempting to say: ./run v1.0.0 HEAD to see how we've sped up Git over the years. Unfortunately, this doesn't quite work because versions of Git prior to v1.7.0 lack bin-wrappers, so our "run" script doesn't correctly put them in the PATH. Worse, it means we silently find whatever other "git" is in the PATH, and produce test results that have no bearing on what we asked for. Let's fallback to the main git directory when bin-wrappers isn't present. Many modern perf scripts won't run with such an antique version of Git, of course, but at least those failures are detected and reported (and you're free to write a limited perf script that works across many versions). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/perf/run')
-rwxr-xr-xt/perf/run3
1 files changed, 3 insertions, 0 deletions
diff --git a/t/perf/run b/t/perf/run
index e8adeda..c788d71 100755
--- a/t/perf/run
+++ b/t/perf/run
@@ -63,6 +63,9 @@ run_dirs_helper () {
unset GIT_TEST_INSTALLED
else
GIT_TEST_INSTALLED="$mydir/bin-wrappers"
+ # Older versions of git lacked bin-wrappers; fallback to the
+ # files in the root.
+ test -d "$GIT_TEST_INSTALLED" || GIT_TEST_INSTALLED=$mydir
export GIT_TEST_INSTALLED
fi
run_one_dir "$@"