Documentation
¶
Overview ¶
Command slowtests reads `go test -json` on its input, prints what go test prints without -json (the output of the tests that fail, the build errors, a line per package), and fails when a test fails or when a top-level test took longer than -max: tests stay fast, and a slow one is caught the day it slows down.
Linux is the reference: there -max fails. Elsewhere a process costs ten times more (a test spawning git takes 0.7 s on Linux and 7 s on the Windows runner, the same test), so a test over -max is reported and fails only over -max-elsewhere: a test that hangs or grows tenfold is still caught there.
go test -json ./... | go run ./tools/slowtests
A test that must stay slow goes in allowed, with why: the list stays empty unless a test has a reason.