[PATCH v2 5/9] perf/run: add get_subsections()
- From
Christian Couder <chriscool@tuxfamily.org>
- Date
- Sep 23, 2017, 19:55 UTC
- Message-ID
- <0102015eb04f89f3-1c6db13e-2a6c-47b8-9519-b27a6c91e420-000000@eu-west-1.amazonses.com>
- In-Reply-To
- <0102015eb04f8927-439213ae-a464-4638-affa-f0d6484086c0-000000@eu-west-1.amazonses.com>
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> --- t/perf/run | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/t/perf/run b/t/perf/run index 6bd15e701756b..4c966c0ae420e 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" -- https://github.com/git/git/pull/408