Commit Graph

34 Commits

Author SHA1 Message Date
17b2879c3e ww test: report no tests to run 2026-08-21 16:15:12 +09:00
8a5fc8977f ww: preserve original environment for directory tests 2026-08-21 12:57:55 +09:00
bcc3aa9336 ww: report no test files for empty test packages 2026-08-21 11:59:46 +09:00
394e46ff2f ww: print final status for explicit test failures 2026-08-21 07:39:54 +09:00
b5fb478613 ww: put test result trailers on a new line 2026-08-21 06:19:26 +09:00
9b6b1100f4 ww: put selected toolchain first in test PATH 2026-08-21 05:30:10 +09:00
1b71250ad5 ww: protect public install outputs 2026-08-21 04:11:01 +09:00
ce91f6662c ww build: honor output directories 2026-08-21 02:32:56 +09:00
71a9da2058 ww build: discard exact null outputs 2026-08-20 23:17:23 +09:00
77168fd891 ww test: allow -c with persistent workdirs 2026-08-20 20:40:01 +09:00
db5782eff9 ww test: retain directory test binaries like Go 2026-08-20 20:13:08 +09:00
f28843f2f5 ww test: preserve combined product output order
Go 1.26.5 maps each test binary's stdout and stderr to the same product writer. Teach the captured executor to share one open file description for byte-equal output paths, then make directory test products emit that one ordered capture on coordinator stdout. Build captures and inherited-stdio routes remain unchanged.\n\nKeep the executor mechanism, package policy, native Cstage/WWstage proof, and normative contract together so every commit preserves the observable test-output behavior.
2026-08-20 18:29:09 +09:00
5f75fcb113 ww: run directory tests from package source 2026-08-20 15:58:47 +09:00
8dad2755b3 ww: unify directory package-test products 2026-08-15 01:27:16 +09:00
f138844737 ww: select sources by Go platform suffixes 2026-08-14 21:25:16 +09:00
d5fdc27c0a ww: implement recursive local package patterns 2026-08-13 23:42:37 +09:00
b84fb3ff25 ww: implement local vendor package semantics 2026-08-13 19:18:00 +09:00
00903b986b ww: grow package universes dynamically 2026-08-13 08:08:49 +09:00
c3df0afeb0 build: separate package identity from storage paths 2026-08-13 05:37:56 +09:00
0aff801def ww: canonicalize directory package identities 2026-08-13 02:48:12 +09:00
f8ec59999d ww: intern canonical directory package actions 2026-08-13 00:54:08 +09:00
29e97ff8a1 cmd: share package builds across test directories 2026-08-12 13:54:15 +09:00
dd975d195c cmd: share package builds across test products 2026-08-12 11:42:24 +09:00
9862f0c05f cmd: build directory package test variants 2026-08-12 03:46:47 +09:00
a3d7f61792 wwpackage: validate cleanup directory after open 2026-08-09 04:06:45 +09:00
cd11d6e573 ww: driver/coordinator robustness — dirent errors, EINTR, block comments
Three same-cluster robustness holes. enumeratedir treated a failed
getdents64 (r<0) as EOF: a mid-walk error silently truncated the
package source list, and a first-read error was misdiagnosed as
"directory contains no WW package sources" -- it now routes the
caller's "cannot read directory" arm. run_test_bin's waitpid had no
EINTR retry and its return was unchecked, so an interrupted wait
left status==0 and reported a false test PASS (the do_run twin
already retried). The coordinator's pkgskipspace now also skips
/* */ before the package clause like the driver's sep_skip_space --
a source opening with a block comment built under ww but failed
coordinator discovery.
2026-08-09 02:05:48 +09:00
62b9d20383 toolchain: banner purge + WHY-only comment sweep (rule 8)
selfhost/, cmd/, internal/ join the tree-wide sweep: every section
banner dies (91 selfhost + the cmd C-style dividers -> 0); narration
and stale contracts deleted (pre-#22 bundler notes, retired
single-PT_LOAD and no-archive claims, superseded ABI tables); every
ref/harec/qbe cite, task cite, encoding/ELF contract, and rule-10
twin pointer kept; lost lifetime/rationale lines restored where the
sweep over-cut (elf_globals ownership, kwtab linear-scan). Comment-
only proven: all five wwstage tool binaries byte-identical across
the sweep; test-commit, test-byteid (161+1399, 0 pinned-divergent),
and test-bootstrap (fixed point + 991-995 byte-id) all exit 0.
The read-through banked 66 latent-bug leads (checkpoint).
2026-08-08 23:14:03 +09:00
659e859f34 ww: test sources are *_test.ww only (Go contract)
Go compiles only _test.go files as tests; discovery now keys on the
_test.ww suffix alone. The line-leading-@test compatibility allowance
(noncanonical filenames admitted as test sources) is removed from both
driver stages and the coordinator. An @test declaration outside a
*_test.ww file is rejected loudly ("@test declaration outside
*_test.ww", wording byte-identical cs/ww) instead of silently running
under compose or silently dropping in a non-T build (#6). Tree audit
found zero real carriers; the two allowance fixtures flip canonical
(dep_test.ww, widget_test.ww). New pins: direnum attest-noncanon
reject row (both-stage stderr parity) and the coordinator
noncanonical_attest_rejected package row.
2026-08-08 20:38:02 +09:00
5a263cb115 test: library behavior owned by the coordinator lib/... walk
Go has no per-file test targets: the PACKAGE is the unit of testing
(`go test ./...`) and same-package test files compose together. The
59-target LIBRARY_TESTS fan-out (per-file -w workdirs, one Make rule
per suite) collapses to one line: `ww test -j $(JOBS) -w
out/wwbuild/wwtest-lib -I lib/ww lib/...` — the regex dir-route
precedent generalized. The lib/regex line and the per-file pattern
rule instance dissolve with it (test/lang keeps its own rule).

Measured before committing (-j4, strings edit row): old per-file
warm 4.7-4.9s; bare walk 5.2-5.6s — a real regression, so the
coordinator first gained the brief's persistent per-package workdir:
`-w DIR` on a package target forwards to wwpackage, which keys
DIR/<dir>_<pkg> per group and hands it to each inner `ww test -c`
build. Reuse stays entirely with the driver's existing
content-identity contract — the coordinator adds pure path policy,
no cache machinery. Both driver stages drop their package-target -w
rejects (forward instead); -w with -c stays rejected at the
coordinator (two ownership contracts). After: 3.9-4.0s on the edit
row, 1.0s warm no-op, 2.5s cold — faster than the old flow on every
row.

package_test's tree -w reject row becomes the positive contract
(cold+warm byte-stable stream, cs/ww same) plus the -c conflict
reject. libbyteid roster shape DECIDED: per-file fx entries stay —
every enrolled file is still standalone-buildable, so coverage is
byte-for-byte unchanged; the dir-mode entry form arrives only with
the B3 shared-helper split that first needs it. Docs: owner table,
target table, -w contract paragraph.
2026-08-08 19:35:50 +09:00
192ddd4c66 ww: package-level -c -o names the single package's test artifact
The last Open-driver-work bullet. `-c -o <name>` replaces the fixed
<package>.test stem for exactly one package; the coordinator rejects a
multi-package fan-out ("cannot use -o with multiple packages", Go's
`go test -o` rule) and -o without -c is rejected at the driver
("needs -c for a package target" — a plain run executes from the temp
root, so a caller-owned name has nothing to name). Both driver stages
byte-identical wording; -S keeps its single-file-only reject.

package_test gains the contract row (naming, fixed-stem absence,
artifact runs, both rejects, both drivers); the tree-mode -o row's
pinned wording follows the contract.
2026-08-08 17:30:36 +09:00
07dfc0e6af wwpackage: drop the indexed-source pointer alias
The task #6 fallback landed; handles[k].result copies and &handles[k]
arguments compile directly, so the WHY-comment alias is dead.
2026-08-08 17:12:48 +09:00
15137054e2 wwtest: bounded package concurrency via exec start/poll 2026-08-08 13:43:55 +09:00
0f0fd36563 ww: recursive DIR/... package discovery for ww test 2026-08-08 13:35:34 +09:00
7a2c21acfb wwtest: native package-test coordinator
Single-directory package-test planner: discovers *.ww, groups white-box
and external <pkg>_test sources, composes the combined test package,
builds it through the sibling ww driver, and runs it with the runtime's
-package/-list/-timeout-ms contract. test/package holds its E2E corpus
and the manual runtime fixture set.
2026-08-07 23:01:03 +09:00