util/cibuild, cache_key_test: skip TestTsgoRevInCacheKey outside Tailscale CI
cibuild.On() returns true for any CI environment that sets CI=true, including Alpine Linux's package build CI. TestTsgoRevInCacheKey was guarded by cibuild.On() (or use of tsgo), so it ran under Alpine's CI with stock Go, where go.toolchain.rev isn't blended into build cache keys, and unsurprisingly failed. Add cibuild.OnTailscaleCI, which keys off GITHUB_REPOSITORY_OWNER to distinguish tailscale/tailscale's own GitHub Actions CI from arbitrary downstream CI, and use it in TestTsgoRevInCacheKey. Fixes #19754 Change-Id: Id31cfe71903a235f1460dca1e2fdf334e3ba1ee5 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
fa49009eee
commit
ef1bb5ac16
+2
-2
@@ -21,8 +21,8 @@ import (
|
||||
func TestTsgoRevInCacheKey(t *testing.T) {
|
||||
goRoot := goEnv(t, "GOROOT")
|
||||
isTsgo := strings.Contains(goRoot, "/.cache/tsgo/")
|
||||
if !cibuild.On() && !isTsgo {
|
||||
t.Skip("skipping; not in CI and not using the Tailscale Go toolchain")
|
||||
if !cibuild.OnTailscaleCI() && !isTsgo {
|
||||
t.Skip("skipping; not in Tailscale CI and not using the Tailscale Go toolchain")
|
||||
}
|
||||
|
||||
rev := strings.TrimSpace(GoToolchainRev)
|
||||
|
||||
Reference in New Issue
Block a user