diff --git a/vcs-test/vcweb/deathclock_go121_test.go b/vcs-test/vcweb/deathclock_go121_test.go new file mode 100644 index 00000000..5ab45c86 --- /dev/null +++ b/vcs-test/vcweb/deathclock_go121_test.go @@ -0,0 +1,13 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build go1.22 + +package main_test + +func init() { + // When development begins for the Go 1.22 cycle, the supported Go + // releases will be Go 1.20 and 1.21. + go119Unsupported = true +} diff --git a/vcs-test/vcweb/deathclock_test.go b/vcs-test/vcweb/deathclock_test.go new file mode 100644 index 00000000..ab833c19 --- /dev/null +++ b/vcs-test/vcweb/deathclock_test.go @@ -0,0 +1,27 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main_test + +import "testing" + +var go119Unsupported = false + +var turndownMsg = ` +Since Go 1.19 is not longer supported, vcs-test.golang.org is no +longer needed for testing any release branch and should be turned +down, and x/build/vcs-test/... should be deleted. +(See https://go.dev/issue/27494.)` + +func TestTurnDownVCSTest(t *testing.T) { + if !go119Unsupported { + return + } + + if testing.Short() { + t.Log(turndownMsg) + } else { + t.Fatal(turndownMsg) + } +}