Artifact bd064ee71e2af0362de50a8b6a61d2a19db893bfbcd00a96db816d5c745eb339:
- File
conformance/harness_check_test.go
— part of check-in
[43df2fd2c2]
at
2026-10-26 00:59:23
on branch fix/conformance-subtest-t
— test(conformance): hand each case its subtest's t; cancel stale Race runs
check runs each case as a subtest, but the suites passed the case the parent's t, captured in a closure. A fixture that skips or fails, as the fossil-built R-card fixture skips when fossil(1) is absent, then called SkipNow or FailNow on the parent from inside the subtest, which Go fails as "subtest may have called FailNow on a parent test". The Race workflow installs no fossil and failed this way in TestSparseCone. check now hands conforms the subtest's t, and all 150 call sites take it, so a case's skip or failure ends that case alone. TestCheckSkipEndsOnlyTheCase guards the harness.
A Race run takes most of an hour and merges land faster, so a new run on a ref now cancels the older one. (user: [email protected], size: 763) [annotate] [blame] [check-ins using] [more...]
package conformance import "testing" // A case whose fixture skips, as one does when fossil(1) is absent, must end // that case alone. The harness runs each case as a subtest, so the case has to // skip on the subtest's t: skipping the parent from inside the subtest fails // the whole run, which is what the Race workflow, with no fossil installed, // hit. The probe runs check in a subtest of its own and expects it not to // fail. func TestCheckSkipEndsOnlyTheCase(t *testing.T) { probe := Case{ID: "harness.check.skip-ends-case", Req: "harness"} ok := t.Run("probe", func(t *testing.T) { check(t, probe, func(t *testing.T) error { t.Skip("fixture unavailable") return nil }) }) if !ok { t.Fatal("a case that skipped failed its parent") } }