cmd/link: short tests are not short enough #26470
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.
The text was updated successfully, but these errors were encountered:
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 <firstname.lastname@example.org> Reviewed-by: Austin Clements <email@example.com>
Takes about 1.4 sec on laptop mac:
Can we close it?
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 <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com> Reviewed-by: Brad Fitzpatrick <firstname.lastname@example.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 <email@example.com>