summaryrefslogtreecommitdiff
path: root/t/perf/run
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2017-09-23 19:55:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-09-24 07:58:34 (GMT)
commit2638441e075ffcb6467e754f085a6d285bc9cced (patch)
treede43eb3d50ffb7c7981c75100f951bd67381a418 /t/perf/run
parent948e22e2bb8a7786e12f5564238b68419a9419b7 (diff)
downloadgit-2638441e075ffcb6467e754f085a6d285bc9cced.zip
git-2638441e075ffcb6467e754f085a6d285bc9cced.tar.gz
git-2638441e075ffcb6467e754f085a6d285bc9cced.tar.bz2
perf/run: add get_subsections()
This function makes it possible to find subsections, so that we will be able to run different tests for different subsections in a later commit. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/perf/run')
-rwxr-xr-xt/perf/run7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/perf/run b/t/perf/run
index 6bd15e7..4c966c0 100755
--- a/t/perf/run
+++ b/t/perf/run
@@ -93,6 +93,13 @@ run_dirs () {
done
}
+get_subsections () {
+ section="$1"
+ test -z "$GIT_PERF_CONFIG_FILE" && return
+ git config -f "$GIT_PERF_CONFIG_FILE" --name-only --get-regex "$section\..*\.[^.]+" |
+ sed -e "s/$section\.\(.*\)\..*/\1/" | sort | uniq
+}
+
get_var_from_env_or_config () {
env_var="$1"
conf_var="$2"