Use the helper added by CL 422038 instead of manually detecting the
noopt builder.
Change-Id: I353f1a9d5f0184d73869520eb1ae8d0bdbbe2006
Reviewed-on: https://go-review.googlesource.com/c/go/+/423855
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
// Plan9 wasn't optimized.
t.Skipf("skipping on %v", runtime.GOOS)
}
- builder := os.Getenv("GO_BUILDER_NAME")
- switch builder {
- case "linux-amd64-noopt":
- // Optimizations are required to remove the allocs.
- t.Skipf("skipping on %v", builder)
- }
+ // Optimizations are required to remove the allocs.
+ testenv.SkipIfOptimizationOff(t)
+
conn, err := ListenUDP("udp4", &UDPAddr{IP: IPv4(127, 0, 0, 1)})
if err != nil {
t.Fatal(err)