diff --git a/Makefile b/Makefile index d6169a40..6c69ba02 100644 --- a/Makefile +++ b/Makefile @@ -3256,7 +3256,7 @@ sizelint: peellint: @sh tools/peellint -test: all sizelint peellint $(TESTS) test-lang test-lang-byteid +test: all sizelint peellint $(TESTS) test-lang test-lang-byteid test-run @WW=$(BIN)/ww BIN=$(BIN) sh test/run test-unit: all sizelint peellint $(TESTS) @@ -3264,12 +3264,22 @@ test-unit: all sizelint peellint $(TESTS) # ---- test-run: ww-native behavior harness (fold 2) --------------------- # Drives test/runww.ww over every test/wcc/data//case.ww, building -# and running each case through the cstage `ww` driver (T1) and checking -# its leading `//ww:` directive. The harness prints `runww: all ok` and exits -# 0 only if every case passes; the target propagates that exit code. NOT -# yet wired into `make test` (fold 6). See test/runww.ww header. +# and running each case through the cstage `ww` driver (T1, plus the ERROR +# arm's wwstage w6c_ww leg) and checking its leading `//ww:` directive. The +# harness prints `runww: all ok` and exits 0 only if every case passes; the +# target propagates that exit code. Wired into `make test` (pre-push only). +# +# runww execve's its child `ww`/`w6c_ww` with a NIL envp, so a WW_PKGCACHE= +# override can't reach them — the children write the DEFAULT out/.pkgcache, +# the same cache the recipe's $(TESTS)/byte-id gates use. The order-only +# prereqs (after `|`) force `make test -j` to schedule test-run strictly +# LAST among the prereqs, so it cannot run concurrently with any default- +# cache writer (`all`'s selfhost builds are already ordered via the normal +# `all` prereq; test-lang/test-lang-byteid use isolated caches, but ordering +# after them is belt-and-suspenders). The recipe's 990-997/pkgcache default- +# cache tests run only after ALL prereqs complete, so no overlap there. RUNWW_CASES = $(wildcard test/wcc/data/*/case.ww) -test-run: all +test-run: all | $(TESTS) test-lang test-lang-byteid @BIN=$(BIN) $(BIN)/ww run test/runww.ww $(RUNWW_CASES) # ---- test-lang: in-language @test behavior corpus (fold 2) -------------