-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: short tests are not short enough #26472
Comments
Would love to give it a shot, can you please explain what
Mean? |
See (The |
There are several cmd/go tests in go_test.go. Will submit CL for three of the most time consuming tests listed below. Additionally, will make them non-short.
|
Change https://golang.org/cl/126636 mentions this issue: |
cmd/go times out on my Windows 10 but I noticed that |
Change https://golang.org/cl/127542 mentions this issue: |
* TestAtomicCoverpkgAll -> Script/cover_atomic_pkgall.txt and make it * non-short * TestCoverpkgAllRuntime -> Script/cover_pkgall_runtime.txt and make it * non-short * TestCpuprofileTwice -> Script/cpu_profile_twice.txt and make it * non-short * TestGoTestMainTwice -> make it non-short Updates #26472 Change-Id: I24f3d4c2a8b6e317adb369a1b1426e693f9571ed Reviewed-on: https://go-review.googlesource.com/126636 Reviewed-by: Bryan C. Mills <[email protected]> Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
We're currently at |
Change https://golang.org/cl/267883 mentions this issue: |
'get -d' has somewhat narrower semantics and is generally faster. We're deprecating the non-'-d' mode in CL 266360. For #26472 Change-Id: Id4a324771f77b83e5f47043fd50b74e1c062390b Reviewed-on: https://go-review.googlesource.com/c/go/+/267883 Trust: Bryan C. Mills <[email protected]> Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
As of CL 267883, we're back down to ~25s end-to-end wall time for the test on my workstation.
I'm going to close this issue as “resolved enough”, but we can of course keep improving the tests afterward. |
Running all.bash (which does go test -short std cmd), my target is usually that individual tests should run in under 1 second.
The cmd/go tests will never reach this target - cmd/go does more than perhaps the entire standard library combined, so it's fine to take more than 1 second. But my usual target is to keep it below 30s, if not 20s. Right now it's at 76s. We should keep bringing that down.
Converting more tests to scripts may help.
The text was updated successfully, but these errors were encountered: