(t *testing.T)
| 12 | ) |
| 13 | |
| 14 | func TestToolchainMatches(t *testing.T) { |
| 15 | tsRev, ok := tailscaleToolchainRev() |
| 16 | if !ok { |
| 17 | t.Fatal("failed to read build info") |
| 18 | } |
| 19 | want := strings.TrimSpace(GoToolchainRev) |
| 20 | if tsRev != want { |
| 21 | if os.Getenv("TS_PERMIT_TOOLCHAIN_MISMATCH") == "1" { |
| 22 | t.Logf("tailscale.toolchain.rev = %q, want %q; but ignoring due to TS_PERMIT_TOOLCHAIN_MISMATCH=1", tsRev, want) |
| 23 | return |
| 24 | } |
| 25 | t.Errorf("tailscale.toolchain.rev = %q, want %q; permit with TS_PERMIT_TOOLCHAIN_MISMATCH=1", tsRev, want) |
| 26 | } |
| 27 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…