summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Christian Couder <chriscool@tuxfamily.org>2017-09-23 19:55:56 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-09-24 16:58:34 +0900
commite3d5e1207ea62dca81116a14abef4a537188865d (patch)
tree7feb8a5f90ce4b082ed2a8aeb61ab83987189f72
parentMerge branch 'jk/leak-checkers' (diff)
downloadtgif-e3d5e1207ea62dca81116a14abef4a537188865d.tar.xz
perf/run: add '--config' option to the 'run' script
It is error prone and tiring to use many long environment variables to give parameters to the 'run' script. Let's make it easy to store some parameters in a config file and to pass them to the run script. The GIT_PERF_CONFIG_FILE variable will be set to the argument of the '--config' option. This variable is not used yet. It will be used in a following commit. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/perf/run7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/perf/run b/t/perf/run
index beb4acc0e4..1e7c2a59e4 100755
--- a/t/perf/run
+++ b/t/perf/run
@@ -2,9 +2,14 @@
case "$1" in
--help)
- echo "usage: $0 [other_git_tree...] [--] [test_scripts]"
+ echo "usage: $0 [--config file] [other_git_tree...] [--] [test_scripts]"
exit 0
;;
+ --config)
+ shift
+ GIT_PERF_CONFIG_FILE=$(cd "$(dirname "$1")"; pwd)/$(basename "$1")
+ export GIT_PERF_CONFIG_FILE
+ shift ;;
esac
die () {