]> Cypherpunks.ru repositories - gostls13.git/commit
[release-branch.go1.22] internal/testenv: allow "-noopt" anywhere in builder name...
authorMichael Anthony Knyszek <mknyszek@google.com>
Thu, 25 Jan 2024 17:13:11 +0000 (17:13 +0000)
committerMichael Knyszek <mknyszek@google.com>
Thu, 8 Feb 2024 16:18:28 +0000 (16:18 +0000)
commit53d1b73dffb567f1d568140e8692a34b3f96a79b
tree0284129fd4bd517b7aae5a4aa846855bd6bb6803
parentdd31ad7e9f8cf9b719354e0e5f28ea4d4a8ed0ec
[release-branch.go1.22] internal/testenv: allow "-noopt" anywhere in builder name in test

testenv's TestHasGoBuild test is supposed to allow noopt builders to not
have go build, but the pattern match is failing on the LUCI builders
where a test shard might have an additional "-test_only" suffix in the
builder name. Furthermore, in the LUCI world, "run mods" (the builder
type suffixes) are supposed to be well-defined and composable, so it
doesn't make sense to restrict "-noopt" to the builder suffix anyway.

This change modifies the test to allow "-noopt" to appear anywhere in
the builder name when checking if it's running on a noopt builder.

For #65470.
Fixes #65471.

Change-Id: I393818e3e8e452c7b0927cbc65726d552aa8ff8e
Reviewed-on: https://go-review.googlesource.com/c/go/+/558596
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
(cherry picked from commit 93f0c0b25e7ea8ae7c2d5df32c6083cfabf2ffc2)
Reviewed-on: https://go-review.googlesource.com/c/go/+/560696
src/internal/testenv/testenv_test.go