Skip to content

Commit bcf01c9

Browse files
committed
Arm backend: Parallelize documentation checks
Run Arm docgen and the U55, U85, and VGF operator-support checks concurrently while preserving grouped output and failure reporting. Authored with Codex. Signed-off-by: Per Held <per.held@arm.com> Change-Id: I9ebcd95f86ab0195d2c01e61bca96a7857453a9d
1 parent 344c9e4 commit bcf01c9

1 file changed

Lines changed: 23 additions & 9 deletions

File tree

‎backends/arm/scripts/pre-push‎

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,21 @@ is_docgen_trigger_file() {
5757
}
5858

5959
run_docgen_check() {
60+
local FAILED=0
61+
6062
echo -e "${INFO} Running Arm docgen"
61-
python backends/arm/scripts/docgen/docgen.py
62-
if [[ $? -ne 0 ]]; then
63+
if ! python backends/arm/scripts/docgen/docgen.py; then
6364
echo -e "${ERROR} Failed to run Arm docgen"
6465
FAILED=1
65-
return
66-
fi
67-
68-
if ! git diff --quiet HEAD -- "${DOCGEN_OUTPUTS[@]}"; then
66+
elif ! git diff --quiet HEAD -- "${DOCGEN_OUTPUTS[@]}"; then
6967
echo -e "${ERROR} Arm docgen updated generated documentation." >&2
7068
echo -e "${INFO} Review and commit the regenerated docs before pushing."
7169
git diff HEAD -- "${DOCGEN_OUTPUTS[@]}"
7270
FAILED=1
7371
else
7472
echo -e "${SUCCESS} Arm docgen OK"
7573
fi
74+
return "$FAILED"
7675
}
7776

7877
run_op_support_checks() {
@@ -356,19 +355,34 @@ for COMMIT in ${COMMITS}; do
356355
echo "" # Newline to visually separate commit processing
357356
done
358357

358+
docgen_pid=""
359359
if [[ $RUN_DOCGEN -eq 1 ]]; then
360-
run_docgen_check
360+
run_docgen_check > "${check_output_dir}/docgen" 2>&1 &
361+
docgen_pid=$!
361362
else
362363
echo -e "${INFO} Skipping Arm docgen (no public API inputs changed)"
363364
fi
364365

365366
run_op_support_checks "u55" "Ethos-U55" "$U55_OP_SUPPORT_OUTPUT" \
366367
> "${check_output_dir}/u55" 2>&1 &
367368
u55_pid=$!
368-
run_op_support_checks "vgf" "VGF" "$VGF_OP_SUPPORT_OUTPUT" || FAILED=1
369+
run_op_support_checks "u85" "Ethos-U85" "$U85_OP_SUPPORT_OUTPUT" \
370+
> "${check_output_dir}/u85" 2>&1 &
371+
u85_pid=$!
372+
run_op_support_checks "vgf" "VGF" "$VGF_OP_SUPPORT_OUTPUT" \
373+
> "${check_output_dir}/vgf" 2>&1 &
374+
vgf_pid=$!
375+
376+
if [[ -n "$docgen_pid" ]]; then
377+
wait "$docgen_pid" || FAILED=1
378+
cat "${check_output_dir}/docgen"
379+
fi
369380
wait "$u55_pid" || FAILED=1
370381
cat "${check_output_dir}/u55"
371-
run_op_support_checks "u85" "Ethos-U85" "$U85_OP_SUPPORT_OUTPUT" || FAILED=1
382+
wait "$u85_pid" || FAILED=1
383+
cat "${check_output_dir}/u85"
384+
wait "$vgf_pid" || FAILED=1
385+
cat "${check_output_dir}/vgf"
372386
wait_public_api_validator
373387
cat "${check_output_dir}/manifest"
374388

0 commit comments

Comments
 (0)