Skip to content

Commit 042167b

Browse files
committed
workbench: fix run iteration
1 parent 1b7a906 commit 042167b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ERA ?= bage
1212

1313
PROFILE ?= default-${ERA}
1414
REV ?= master
15+
ITER ?= 1
1516
ARGS ?=
1617
CMD ?=
1718
RUN ?=

nix/workbench/wb

+6-4
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,10 @@ start()
155155
profile_name=${profile_name:-$(jq '.name' -r $profile/profile.json)}
156156
analysis_type=$(jq '.analysis.type' -r $profile/profile.json)
157157

158-
progress "top-level" "iterations of profile $(with_color 'yellow' $profile_name): $(with_color 'white' $iterations)"
159-
for ((i=0; i<$iterations; i++))
160-
do local args=(
158+
local top_i
159+
for ((top_i=0; top_i<$iterations; top_i++))
160+
do progress "top-level" "profile $(with_color 'yellow' $profile_name), iteration $(with_color 'white' $((top_i+1))) of $(with_color 'yellow' $iterations)"
161+
local args=(
161162
${run_allocate_args[@]}
162163
--manifest "$(manifest collect-from-checkout "$node_source" $node_rev)"
163164
)
@@ -172,7 +173,8 @@ start()
172173
if test -n "$no_analysis" -o $analysis_type = null; then continue; fi
173174

174175
progress "top-level | analysis" "analysis type $(with_color yellow $analysis_type) on $(with_color white $tag)"
175-
analyse ${analyse_args[@]} $analysis_type $tag ||
176+
analyse ${analyse_args[@]} $analysis_type $tag &&
177+
progress "run | analysis" "done" ||
176178
if test -n "$analysis_can_fail" -a -z "$no_retry_failed_runs"
177179
then progress "run | analysis" "log processing failed, but --analysis-can-fail prevents failure: $(with_color red $tag)"
178180
iterations=$((iterations + 1))

0 commit comments

Comments
 (0)