Skip to content

Commit e3d5e12

Browse files
chriscoolgitster
authored andcommitted
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>
1 parent 59c0ea1 commit e3d5e12

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

t/perf/run

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22

33
case "$1" in
44
--help)
5-
echo "usage: $0 [other_git_tree...] [--] [test_scripts]"
5+
echo "usage: $0 [--config file] [other_git_tree...] [--] [test_scripts]"
66
exit 0
77
;;
8+
--config)
9+
shift
10+
GIT_PERF_CONFIG_FILE=$(cd "$(dirname "$1")"; pwd)/$(basename "$1")
11+
export GIT_PERF_CONFIG_FILE
12+
shift ;;
813
esac
914

1015
die () {

0 commit comments

Comments
 (0)