Documentation
¶
Overview ¶
Command expruntime-ratchet is the experimental-runtime lane's ratchet (#2256 U3, #2338). It reads the `go test -json` output of a run with TOFU_X_EXPERIMENTAL_RUNTIME=1 and CHOUDOUFU_NEW_RUNTIME_STRICT=1 (#2397: refuse, not fall back to the default runtime) and checks it against the checked-in expected-failures list, live/experimental-runtime/expected-failures.json:
- a listed test that passes fails the job until it is taken off the list;
- an unlisted test that fails fails the job (a regression, or something upstream broke);
- a SkipExperimental call in a fork-owned test fails the job unless the list's "skips" names that test with a reason. Without this a skip would take a test off the list without it ever passing. A call is upstream-owned, and left alone, when the same test function in the same directory calls SkipExperimental in the raw upstream graft.
Every list entry needs a reason. Skips are counted and printed.
Usage:
TOFU_X_EXPERIMENTAL_RUNTIME=1 CHOUDOUFU_NEW_RUNTIME_STRICT=1 go test -json ./internal/tofu ... > results.json go run ./tools/expruntime-ratchet -results results.json
The last line is the verdict, "RATCHET: PASS ..." or "RATCHET: FAIL ...". Read that line, not the exit code alone.