A tool for breaking things, since doing it by hand went wrong twice

A check that passes proves nothing until it has been seen to fail. Doing
that by hand failed twice in two days, and BOTH TIMES IT LOOKED LIKE A
RESULT - the suite ran, went green, and read exactly like "this check does
not catch that".

Once the edit produced code that would not compile, make failed, the exit
status was not looked at, and the previous binary ran the suite. Once the
anchor was right and the filename was wrong, so nothing was edited at all.

Neither had anything to do with header dependencies, which have always
worked: DEPFLAGS is -MMD -MP and every .d is included. What was missing
was a harness that refuses to report a result it did not earn.

So Tests/break.sh checks every step of its own work and treats anything
unexpected as a hard error rather than a green run. Not finding the break
is the answer it exists to give, and it is worthless if it can also be the
answer when the break never happened. It restores the file on the way out,
including on an interrupt.

It is not in the suite and docs.sh does not count it, for the reason
makedisks.sh is not counted turned round - but being left out of the count
is not being left out of the manual, and that gap is where a script goes
undocumented for months. So docs.sh now requires both of them to be
described, and caught this one being missing.

Also: video.sh reads the fixture disks and does not build them, so after
make sanitize clears the build directory it reported SEVEN product-looking
failures for a missing file. It builds them now and says so.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW
This commit is contained in:
Anachronaut
2026-09-02 13:19:22 -04:00
co-authored by Claude Opus 5
parent 9eed23120f
commit f8c3db5d56
4 changed files with 162 additions and 2 deletions
+15
View File
@@ -23,6 +23,21 @@ for tool in "$ASM" "$EMU"; do
[ -x "$tool" ] || { echo "$(basename "$tool") is not built."; exit 1; }
done
# ---- The fixture disks, which this suite reads and does not build ----
#
# Everything that boots CosmOS below runs off Tests/build/disks/cosmos.img, and that is made
# by run.sh rather than here. When it is absent - after make sanitize, which clears the build
# directory - the emulator has no disk, seven checks find no picture, and the run reports
# SEVEN PRODUCT FAILURES for a missing fixture. That is the worst kind of red: it looks
# exactly like something broke.
#
# So the disks are built if they are not there, and this says so rather than limping on.
if [ ! -f "$ROOT/Tests/build/disks/cosmos.img" ]; then
echo "The fixture disks are not built; building them."
"$ROOT/Tests/makedisks.sh" "$ROOT/Tests/build" > /dev/null \
|| { echo "Couldn't build the test disks."; exit 1; }
fi
rm -rf "$BUILD"; mkdir -p "$BUILD"
PASS=0