Skip to content

Commit 2638441

Browse files
chriscoolgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 948e22e commit 2638441

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

t/perf/run

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ run_dirs () {
9393
done
9494
}
9595

96+
get_subsections () {
97+
section="$1"
98+
test -z "$GIT_PERF_CONFIG_FILE" && return
99+
git config -f "$GIT_PERF_CONFIG_FILE" --name-only --get-regex "$section\..*\.[^.]+" |
100+
sed -e "s/$section\.\(.*\)\..*/\1/" | sort | uniq
101+
}
102+
96103
get_var_from_env_or_config () {
97104
env_var="$1"
98105
conf_var="$2"

0 commit comments

Comments
 (0)