feat(kyberforge): execute the plugin→APM conversion #95

Merged
Defame1297 merged 49 commits from feat/90-execute-apm-conversion into main 2026-08-14 14:32:36 +00:00
Showing only changes of commit 4003c6a273 - Show all commits

View File

@@ -39,11 +39,12 @@ fi
SCRATCH_ROOT="$(mktemp -d)" SCRATCH_ROOT="$(mktemp -d)"
trap 'rm -rf "$SCRATCH_ROOT"' EXIT trap 'rm -rf "$SCRATCH_ROOT"' EXIT
# A failing test is the normal case a CI runner must handle, and a failing # Batches (not a rolling pool) because a bounded rolling pool needs `wait -n`,
# background job makes `wait`/`wait -n` return non-zero -- under `set -e` that # which is bash 4.3+ and this script is explicitly bash-3.2-safe like
# would abort the script right here, before the per-file report below ever # run-tests.sh; plain `wait` -- waiting for every job in the current batch --
# runs. Every wait in this dispatcher is therefore explicitly guarded. # is available since ancient bash. `getconf` over `nproc` for the same
JOBS="$(nproc 2>/dev/null || echo 4)" # reason: `nproc` doesn't exist on macOS.
JOBS="$(getconf _NPROCESSORS_ONLN 2>/dev/null || echo 4)"
running=0 running=0
i=0 i=0
for f in "${TEST_FILES[@]}"; do for f in "${TEST_FILES[@]}"; do
@@ -51,11 +52,11 @@ for f in "${TEST_FILES[@]}"; do
( "$BATS" "$f" >"$SCRATCH_ROOT/$i.log" 2>&1; echo $? >"$SCRATCH_ROOT/$i.status" ) & ( "$BATS" "$f" >"$SCRATCH_ROOT/$i.log" 2>&1; echo $? >"$SCRATCH_ROOT/$i.status" ) &
running=$((running + 1)) running=$((running + 1))
if [[ "$running" -ge "$JOBS" ]]; then if [[ "$running" -ge "$JOBS" ]]; then
wait -n || true wait
running=$((running - 1)) running=0
fi fi
done done
wait || true wait
FAIL=0 FAIL=0
TOTAL_OK=0 TOTAL_OK=0