build: omit named test source operands

This commit is contained in:
2026-08-22 21:53:10 +09:00
parent 3922f1c34e
commit 2e5451a601
13 changed files with 1666 additions and 21 deletions

View File

@@ -18,10 +18,11 @@ package wwdump_test;
// wwdump_ww's exit code is deliberately NOT gated: the diagnostics
// land on stderr regardless, and the armed bail flips the exit code —
// the line count is the one signal stable across the fold sequence.
// #90 sep-feed: `ww build -S` resolves import-bearing fixtures to an
// owner unit and direct exports; this raw wwdump-only gate explicitly
// composes those artifacts because wwdump has no package-input CLI. The
// import-free test/wcc/901_*.ww companions stay raw-fed.
// #90 sep-feed: `ww build -S` resolves production fixtures and `ww test
// -S` resolves test fixtures to an owner unit and direct exports; this raw
// wwdump-only gate explicitly composes those artifacts because wwdump has no
// package-input CLI. The import-free test/wcc/901_*.ww companions stay
// raw-fed.
//
// wwdumpgate (#52, F15 c4) — the -c and -r arms gate on parse-stage
// errors instead of silently emitting over a broken AST: parse-errored
@@ -87,18 +88,20 @@ fn countdiag(stderr: str) i32 = {
if (seps[i]) {
let stem: str = strings.concat(td, "/unit");
let bo: testenv.commandout;
let bav: []str = [testenv.driver("ww"), "build", "-S", "-o",
let action: str = "build";
if (strings.hassuffix(rels[i], "_test.ww")) { action = "test"; };
let bav: []str = [testenv.driver("ww"), action, "-S", "-o",
stem, src];
testenv.runcommand(td, td, "resolve", bav, tmo(), &bo);
if (bo.termination != exec.termination.EXIT || bo.code != 0) {
fail(classes[i], strings.concat(rels[i],
": no resolved sep unit (ww build -S failed)"));
": no resolved sep unit (ww build/test -S failed)"));
};
let work: str = strings.concat(stem, ".sepwork/");
let owner: str = strings.concat(work, "__root.unit.ww");
if (!testenv.exists(owner)) {
fail(classes[i], strings.concat(rels[i],
": __root.unit.ww missing after ww build -S"));
": __root.unit.ww missing after ww build/test -S"));
};
let deps: []str = [];
if (i == 0) { append(deps, "math.checked"); append(deps, "types"); };