ww: lib tests run via -T test mode; bare mains retired (closes @test conversion)

'ww test' gains the istest build path (-T injection in build_one/
buildone) and do_test/dotest accept -I, mirroring do_run - both twins.
The 35 converted lib tests drop their interim bare mains (-T
synthesizes the entry from @test fns and rejects a user main); their
35 C run-drivers flip 'ww run' -> 'ww test'; 989_lib_byteid compiles
lib tests under -T (8 user-main probe fixtures stay non-T, gated on
the fixture field). Abort-on-first-failure stands until the deferred
record-and-continue harness lands with the multi-package arc.
This commit is contained in:
2026-06-10 20:45:46 +09:00
parent 5b212e51cf
commit 2338ea5d59
74 changed files with 178 additions and 670 deletions

View File

@@ -291,14 +291,19 @@ check_one(const char *bin, const char *cwd, const struct ent *e, int idx)
char cs[512], ws[512];
snprintf(cs, sizeof cs, "%s/c.s", td);
snprintf(ws, sizeof ws, "%s/w.s", td);
snprintf(cmd, sizeof cmd, "timeout 180 %s/w6c %s > %s 2>/dev/null",
bin, comb, cs);
/* Fixtures are main-less @test files: -T synthesizes the entry and
* keeps the @test fns symmetrically (non-T drops them cstage-side,
* task #6, so byte-id needs -T). Import-probes carry their own
* `fn main()`, which -T loud-rejects (910), so they stay non-T. */
const char *tflag = e->fixture ? "-T " : "";
snprintf(cmd, sizeof cmd, "timeout 180 %s/w6c %s%s > %s 2>/dev/null",
bin, tflag, comb, cs);
if (runwait(cmd) != 0) {
fprintf(stderr, "lib_byteid FAIL: %s — w6c rejected\n", label);
goto out;
}
snprintf(cmd, sizeof cmd, "timeout 180 %s/w6c_ww -o %s %s >/dev/null 2>&1",
bin, ws, comb);
snprintf(cmd, sizeof cmd, "timeout 180 %s/w6c_ww %s-o %s %s >/dev/null 2>&1",
bin, tflag, ws, comb);
int wrc = runwait(cmd);
if (e->mode == M_WWREJECT) {