summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2023-05-29 09:56:41 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2023-05-29 09:56:41 +0000
commit083901d23b47751f421783b3e602ebd3969c6956 (patch)
tree6865f6ef09366fae5211140cdcbf3bc86d775f3c
parent771c8b6d59e874b99bdf52072daaa5251b359040 (diff)
jenkins-helper.sh (run_step*): Support starting after a specific step
... with appending "+" to the step name, e.g., "--start_at reset_artifacts+". This is useful in pre-commit testing where we need to run reset_artifacts() separately from the rest of the build. Change-Id: Ifae0f421999cc7fcc517c487da7a4493cf2acd59
-rw-r--r--jenkins-helpers.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/jenkins-helpers.sh b/jenkins-helpers.sh
index 99d1ce2a..d858f6b3 100644
--- a/jenkins-helpers.sh
+++ b/jenkins-helpers.sh
@@ -1508,6 +1508,8 @@ git_push ()
# Initialize run_step state
# $1: Step to start execution at (or "" to start at the very first step)
+# Appending "+" to the step name, e.g., "__start_at reset_artifacts+"
+# makes us start on the step right AFTER the specified step.
# $2: Step to finish execution at (or "" to run till the very end)
# $3: Top artifact directory
# $4: Whether to enable "set -x" verbosity for execution steps.
@@ -1622,9 +1624,10 @@ run_step ()
# the current step is the starting step OR
# we haven't run any steps yet and
# there is no set starting step
- if [ x"$pretty_step" = x"$run_step_start_at" ] || \
- ( [ x"$run_step_start_at" = x"" ] && \
- [ x"$run_step_prev_step" = x"" ] ); then
+ if [ "$pretty_step" = "$run_step_start_at" ] \
+ || [ "${run_step_prev_step}+" = "$run_step_start_at" ] \
+ || ( [ "$run_step_start_at" = "" ] \
+ && [ "$run_step_prev_step" = "" ] ); then
run_step_active=true
fi