-
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/link: short tests are not short enough #26470
Comments
I missed that cmd/link/internal/ld takes an additional 12.9 seconds. That's even worse. |
Change https://golang.org/cl/125295 mentions this issue: |
Rejigger the DWARF tests to ensure that they run in a reasonable amount of time in short mode, particularly the "abstract origin sanity" testpoints. Updates #26470 Change-Id: Idae9763ac20ea999fa394595aacfcd1e271293ae Reviewed-on: https://go-review.googlesource.com/125295 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Austin Clements <austin@google.com>
Takes about 1.4 sec on laptop mac:
Can we close it? |
Change https://golang.org/cl/153258 mentions this issue: |
Change https://golang.org/cl/153259 mentions this issue: |
Also skip TestNooptCgoBuild in short mode. Also fix a couple of obscure constants to use values named in cmd/internal/dwarf. This brings the time of the cmd/link/internal/ld tests down to about 1 second on my laptop. Updates #26470 Change-Id: I71c896f30fd314a81d9090f1b6d02edc4174a808 Reviewed-on: https://go-review.googlesource.com/c/153259 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This makes the tests slightly faster, though the bulk of the time is still spent building the test programs. Also run some tests in parallel. Updates #26470 Change-Id: Ia5ec2b99831d69c426b43dbab80613aa03e705f5 Reviewed-on: https://go-review.googlesource.com/c/153258 Reviewed-by: Austin Clements <austin@google.com>
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/link test takes 3.4s on my system. Can we make it take less time?
cmd/link is implicitly tested by pretty much every other test in the system, so it's hard to believe it needs to do a ton in the -short test.
/cc @aclements
The text was updated successfully, but these errors were encountered: