diff --git a/lib/images/macos/tools/soak.sh b/lib/images/macos/tools/soak.sh index bdb1435..663e897 100755 --- a/lib/images/macos/tools/soak.sh +++ b/lib/images/macos/tools/soak.sh @@ -23,6 +23,9 @@ for i in $(seq 1 "$RUNS"); do boots=$(grep -c 'guest kernel boot' "$L" 2>/dev/null); resets=$(grep -c 'system_reset' "$L" 2>/dev/null) panics=$(grep -c 'kernel panic' "$L" 2>/dev/null); tries=$(grep -c 'startosinstall try' "$L" 2>/dev/null) note=$(grep -oE 'prepare too slow[^,]*|PE did not[^,]*|guest halted|powering down|timeout reached' "$L" 2>/dev/null | sort | uniq -c | tr '\n' ';' | tr -s ' ') - printf '%-4s %-8s %-9s %-6s %-7s %-7s %-6s %s\n' "$i" "$([ $rc -eq 0 ] && echo OK || echo FAIL)" "$(( (t1 - t0) / 60 ))" "$boots" "$resets" "$panics" "$tries" "$note" | tee -a "$OUT/summary.txt" + # --rebuild makes nix exit non-zero when the (byte-wise different) qcow2 does not + # match the earlier output; judge the run by the builder's own completion line + if grep -q "install complete" "$D/build.log"; then res=OK; else res=FAIL; fi + printf '%-4s %-8s %-9s %-6s %-7s %-7s %-6s %s\n' "$i" "$res" "$(( (t1 - t0) / 60 ))" "$boots" "$resets" "$panics" "$tries" "$note" | tee -a "$OUT/summary.txt" done echo "logs: $OUT"