aboutsummaryrefslogtreecommitdiff
path: root/docs/history/07-zygote/code/test.sh
diff options
context:
space:
mode:
authorGravatar Moon Flower <moonflower@elhenney.local> 2026-10-14 09:09:21 +0330
committerGravatar Moon Flower <moonflower@elhenney.local> 2026-10-14 09:09:21 +0330
commitdc7f7407e08f54e4a2a3c1d1723b2a7d6959532d (patch)
treed1de9f471a99951c57896f85b5e5523eeb96cee1 /docs/history/07-zygote/code/test.sh
parenttodo: sync docs, examples and fixtures with the include format, and test acto... (diff)
docs: archive the frozen stage code as one compressed tarball
docs/history kept six stages with a full copy of the project under code/, 3.8 mb of sources duplicated from stage to stage and already superseded. store them as docs/history/code-snapshots.tar.gz, 0.66 mb, and extract one in place to read it. every stage's notes.md stays browsable, and the index says where the code went and how to get it back. the top-level README points at the archive too. its other two links into docs/history, 21-micro and 35-bench, were notes that were never kept and do not resolve; the index now records that.
Diffstat (limited to 'docs/history/07-zygote/code/test.sh')
-rwxr-xr-xdocs/history/07-zygote/code/test.sh18
1 files changed, 0 insertions, 18 deletions
diff --git a/docs/history/07-zygote/code/test.sh b/docs/history/07-zygote/code/test.sh
deleted file mode 100755
index add0379..0000000
--- a/docs/history/07-zygote/code/test.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-# builds the zygote for arm64 linux and runs it under qemu.
-# needs gcc, aarch64-linux-gnu-gcc and qemu-aarch64. on an arm64 mac or linux box,
-# build natively instead and drop the qemu prefix.
-cd "$(dirname "$0")"; T=$(mktemp -d); Q="timeout 60 qemu-aarch64"
-chk(){ if [ "$1" = "$2" ]; then echo "ok $3"; else echo "FAIL $3: got [$1]"; fi; }
-gcc -w mkgenome.c -o $T/mkg && cat gen.s aslib.s | $T/mkg >$T/g.h
-cmp -s $T/g.h genome.h && echo "ok genome.h is up to date" || echo "FAIL genome.h is stale, regenerate it"
-aarch64-linux-gnu-gcc -O2 -w -DJTYPE=int -static core.c io_linux.c -o $T/zy || exit 1
-chk "$($Q $T/zy <examples/hello.s)" "hello, world!" "hello"
-chk "$($Q $T/zy <examples/fact.s)" "1101110101111100000000" "recursive factorial"
-chk "$( (cat examples/echo.s; printf '`abc\n') | $Q $T/zy)" "abc" "echo after the backtick"
-chk "$($Q $T/zy <examples/sm.s | tr '\n' '/')" "B/ABA/" "self-patching"
-cat examples/asmain.s aslib.s >$T/asm.s
-(cat $T/asm.s; printf '`'; cat examples/hello.s) | $Q $T/zy >$T/a
-chk "$(od -An -td4 $T/a | tr -s ' \n' ' ' | sed 's/^ //;s/ $//')" "29 1 6 2 1 6 27 16 24 3 26 3 14 0 104 101 108 108 111 44 32 119 111 114 108 100 33 10 0" "self-hosted assembler, running on the zygote, assembles hello"
-chk "$( (cat repl.s; printf '`104 p 105 p 10 p r`121 p 111 p 10 p r') | $Q $T/zy | tr '\n' '/')" "hi/yo/" "repl with mutated assembler"
-rm -rf $T