Browse Source

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>
maint
Christian Couder 8 years ago committed by Junio C Hamano
parent
commit
2638441e07
  1. 7
      t/perf/run

7
t/perf/run

@ -93,6 +93,13 @@ run_dirs () { @@ -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"

Loading…
Cancel
Save