Currently TestPCLine is skipped in short mode. The test builds a
Linux/AMD64 binary, so it makes sense to skip it if we're cross
compiling, as building the runtime takes a while. But if we are
on Linux/AMD64, it will only build a small amount of code, which
isn't really slow. The test runs in 0.14 second on my machine.
I think it is acceptable to run in short mode. Then we'll have
trybot coverage for this test.
Change-Id: If682f88c28050f7daafde35b4f9e59c03b764a35
Reviewed-on: https://go-review.googlesource.com/c/go/+/353330
Trust: Cherry Mui <cherryyz@google.com>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
if runtime.GOARCH != "amd64" {
t.Skipf("skipping on non-AMD64 system %s", runtime.GOARCH)
}
+ // This test builds a Linux/AMD64 binary. Skipping in short mode if cross compiling.
+ if runtime.GOOS != "linux" && testing.Short() {
+ t.Skipf("skipping in short mode on non-Linux system %s", runtime.GOARCH)
+ }
var err error
pclineTempDir, err = os.MkdirTemp("", "pclinetest")
if err != nil {
}
func TestPCLine(t *testing.T) {
- if testing.Short() {
- t.Skip("skipping in -short mode")
- }
dotest(t)
defer endtest()