summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-03-08 20:36:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-03-08 20:36:29 (GMT)
commit74735c9ca7f1026eb62346510c5bb2aad7f78e04 (patch)
treee616e29edd0332ffe3b4a6cf5aaff01502ebc60e /t
parentcd3d56a9624f4e52cfefbf11593d08e0ce8e9133 (diff)
parent53ba2c799a880316330da7520b6b517a4f6acf5e (diff)
downloadgit-74735c9ca7f1026eb62346510c5bb2aad7f78e04.zip
git-74735c9ca7f1026eb62346510c5bb2aad7f78e04.tar.gz
git-74735c9ca7f1026eb62346510c5bb2aad7f78e04.tar.bz2
Merge branch 'rs/perf-repeat-thrice-by-default'
Perf test regression fix. * rs/perf-repeat-thrice-by-default: perf: use GIT_PERF_REPEAT_COUNT=3 by default even without config file
Diffstat (limited to 't')
-rwxr-xr-xt/perf/run8
1 files changed, 3 insertions, 5 deletions
diff --git a/t/perf/run b/t/perf/run
index 1a100d6..213da5d 100755
--- a/t/perf/run
+++ b/t/perf/run
@@ -106,7 +106,6 @@ get_var_from_env_or_config () {
conf_sec="$2"
conf_var="$3"
conf_opts="$4" # optional
- # $5 can be set to a default value
# Do nothing if the env variable is already set
eval "test -z \"\${$env_var+x}\"" || return
@@ -122,13 +121,12 @@ get_var_from_env_or_config () {
fi
var="$conf_sec.$conf_var"
conf_value=$(git config $conf_opts -f "$GIT_PERF_CONFIG_FILE" "$var") &&
- eval "$env_var=\"$conf_value\"" && return
-
- test -n "${5+x}" && eval "$env_var=\"$5\""
+ eval "$env_var=\"$conf_value\""
}
run_subsection () {
- get_var_from_env_or_config "GIT_PERF_REPEAT_COUNT" "perf" "repeatCount" "--int" 3
+ get_var_from_env_or_config "GIT_PERF_REPEAT_COUNT" "perf" "repeatCount" "--int"
+ : ${GIT_PERF_REPEAT_COUNT:=3}
export GIT_PERF_REPEAT_COUNT
get_var_from_env_or_config "GIT_PERF_DIRS_OR_REVS" "perf" "dirsOrRevs"