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>

Christian Couder committed Sep 23, 2017 at 19:55 UTC e3d5e1207ea62dca81116a14abef4a537188865d
1 file changed +6 -1
t/perf/run
+6 -1
@@ -2,9 +2,14 @@
2
3 case "$1" in
4 --help)
5 - echo "usage: $0 [other_git_tree...] [--] [test_scripts]"
5 + echo "usage: $0 [--config file] [other_git_tree...] [--] [test_scripts]"
6 exit 0
7 ;;
8 + --config)
9 + shift
10 + GIT_PERF_CONFIG_FILE=$(cd "$(dirname "$1")"; pwd)/$(basename "$1")
11 + export GIT_PERF_CONFIG_FILE
12 + shift ;;
13 esac
14
15 die () {