aboutsummaryrefslogtreecommitdiffstats
path: root/t/perf
diff options
context:
space:
mode:
Diffstat (limited to 't/perf')
-rwxr-xr-xt/perf/p5332-multi-pack-reuse.sh2
-rw-r--r--t/perf/perf-lib.sh14
2 files changed, 15 insertions, 1 deletions
diff --git a/t/perf/p5332-multi-pack-reuse.sh b/t/perf/p5332-multi-pack-reuse.sh
index d1c89a8b7d..0a2525db44 100755
--- a/t/perf/p5332-multi-pack-reuse.sh
+++ b/t/perf/p5332-multi-pack-reuse.sh
@@ -58,7 +58,7 @@ do
'
test_expect_success "setup bitmaps for $nr_packs-pack scenario" '
- find $packdir -type f -name "*.idx" | sed -e "s/.*\/\(.*\)$/+\1/g" |
+ find $packdir -type f -name "*.idx" | sed -e "s/.*\///" |
git multi-pack-index write --stdin-packs --bitmap \
--preferred-pack="$(find_pack $(git rev-parse HEAD))"
'
diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh
index 5406557b7c..b15c74d6f1 100644
--- a/t/perf/perf-lib.sh
+++ b/t/perf/perf-lib.sh
@@ -25,6 +25,17 @@ TEST_OUTPUT_DIRECTORY=$(pwd)
TEST_NO_CREATE_REPO=t
TEST_NO_MALLOC_CHECK=t
+# GIT-BUILD-OPTIONS, sourced by test-lib.sh, overwrites the `GIT_PERF_*`
+# values that are set by the user (if any). Let's stash them away as
+# `eval`-able assignments.
+git_perf_settings="$(env |
+ sed -n "/^GIT_PERF_/{
+ # escape all single-quotes in the value
+ s/'/'\\\\''/g
+ # turn this into an eval-able assignment
+ s/^\\([^=]*=\\)\\(.*\\)/\\1'\\2'/p
+ }")"
+
# While test-lib.sh computes the build directory for us, we also have to do the
# same thing in order to locate the script via GIT-BUILD-OPTIONS in the first
# place.
@@ -49,6 +60,9 @@ fi
. "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS
. "$GIT_SOURCE_DIR"/t/test-lib.sh
+# Then restore GIT_PERF_* settings.
+eval "$git_perf_settings"
+
unset GIT_CONFIG_NOSYSTEM
GIT_CONFIG_SYSTEM="$TEST_DIRECTORY/perf/config"
export GIT_CONFIG_SYSTEM