test: split fast/full, parallelize 995, race-correct two-phase test/run
test/run fans out test/wcc/*.c except 950 and 990-997 across $(nproc) xargs workers, then runs the byte-id gates sequentially in phase 2. Each worker writes <prefix>.status into a mktemp results dir; the collector emits them in glob order for deterministic output. Phase 2 sequentiality sidesteps the race introduced by ww_ww writing intermediates next to every traversed source (#15) — concurrent reads of selfhost/cmd/<tool>/main.{combined.ww,s,o} would see partial bytes (#16). `make test-unit` (UNIT=1) skips phase 2 entirely for a 3.8s inner-loop check; `make test` runs the full 132 in ~8:30. test-unit goal aligns with the selfhost-bootstrap project goal: 990-997 + 950 are the toolchain-rebuild gates, fast feedback is for unit work below them. 990-995 wrap every ww/w6c/w6a/w6l/wwdump invocation in `timeout 180`; 995's hardcoded /tmp/ww_d_hello.ww is now pid-keyed. 995 forks its 5 ww_ww builds concurrently (waitpid for collection) so its solo wall drops from 3:15 to 1:32. Phase-2 split (parallel readers + sequential writers) deferred to #17, post #15. Wall: 9:59 → 8:32 (full) / 3.8s (test-unit, ~158× from baseline).
This commit is contained in:
5
Makefile
5
Makefile
@@ -935,6 +935,9 @@ sizelint:
|
||||
test: all sizelint $(TESTS)
|
||||
@WW=$(BIN)/ww BIN=$(BIN) sh test/run
|
||||
|
||||
test-unit: all sizelint $(TESTS)
|
||||
@WW=$(BIN)/ww BIN=$(BIN) UNIT=1 sh test/run
|
||||
|
||||
install: all
|
||||
mkdir -p $(PREFIX)/bin $(PREFIX)/lib
|
||||
cp $(BIN)/ww $(PREFIX)/bin/
|
||||
@@ -1080,4 +1083,4 @@ nocc:
|
||||
@echo
|
||||
@echo "NOCC OK: $(STAGE0)/* reproduces itself from source. cc not invoked."
|
||||
|
||||
.PHONY: all cstage wwstage test sizelint install clean bootstrap nocc bootstrap-snapshot
|
||||
.PHONY: all cstage wwstage test test-unit sizelint install clean bootstrap nocc bootstrap-snapshot
|
||||
|
||||
Reference in New Issue
Block a user