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.
Native package-runtime fixtures
These fixtures exercise the compiled package test binary, rather than a
subprocess-per-assertion harness. Build the bootstrap tools once with make all,
then run the focused cases from the repository root:
out/bin/ww test test/package/runtime/success_test.ww
out/bin/ww test -c -o /tmp/ww-runtime-test test/package/runtime/success_test.ww
/tmp/ww-runtime-test 'alpha*' 'delta*'
/tmp/ww-runtime-test -list
/tmp/ww-runtime-test -list 'gamma*'
/tmp/ww-runtime-test -timeout-ms=50 'alpha*'
out/bin/ww test test/package/runtime/fail_test.ww
out/bin/ww test test/package/runtime/multiple_fail_test.ww
out/bin/ww test test/package/runtime/expected_abort_return_test.ww
out/bin/ww test test/package/runtime/premature_exit_test.ww
out/bin/ww test test/package/runtime/signal_test.ww
out/bin/ww test -c -o /tmp/ww-runtime-timeout test/package/runtime/timeout_test.ww
/tmp/ww-runtime-timeout -timeout-ms=50
out/bin/ww test -c -o /tmp/ww-runtime-descendant test/package/runtime/lingering_descendant_test.ww
/tmp/ww-runtime-descendant -timeout-ms=250
out/bin/ww test -c -o /tmp/ww-runtime-escaped test/package/runtime/escaped_descendant_test.ww
/tmp/ww-runtime-escaped -timeout-ms=250
The success fixture reports two ordinary passes, one expected-abort pass, and
one skip with its reason. The preserved test binary accepts repeated glob
arguments directly. List mode prints selected names without starting tests.
Each test has a 30-second default timeout; -timeout-ms=N selects a positive
per-test timeout up to one hour for a direct test-binary invocation.
The current runtime recognizes expectabort(); os.exit(nonzero) as an expected
abort because WW's abort primitive itself terminates with a normal exit status;
the ABI cannot distinguish those two paths without a future abort hook.
The assertion, multiple-failure, unmet-expected-abort, premature-exit, and
signal fixtures fail respectively with a normal exit, two failures whose
process status is still clamped to 1, an expected abort that never happens, an
incomplete completion record, and signal 15; none may be mistaken for a pass.
The timeout fixture fails deterministically as FAIL(timeout). The lingering
descendant fixture passes without waiting on the inherited control-pipe writer:
the descendant blocks SIGTERM, so the runner exercises its grace period and
SIGKILL escalation before draining the record.
The escaped-descendant fixture moves its inherited writer into another process
group for one second. The framed nonblocking protocol returns immediately after
the test leader and owned group complete; it never waits for pipe EOF.