From afd181cf0b69c3591d7e47ceca4fabf14434d77e Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Tue, 17 May 2022 15:38:35 +0700 Subject: test,misc: fix builders that do not support plugin CL 406358 added test that use -buildmode=plugin. But plugin mode only supports on some os/arch pairs, so this CL moving the test to misc/cgo/testplugin directory instead. Updates #52937 Change-Id: Iad049443c1f6539f6af1988bebd4dff56c6e1bf9 Reviewed-on: https://go-review.googlesource.com/c/go/+/406774 Reviewed-by: Michael Knyszek Run-TryBot: Cuong Manh Le Reviewed-by: Cherry Mui Auto-Submit: Cuong Manh Le TryBot-Result: Gopher Robot --- misc/cgo/testplugin/plugin_test.go | 4 ++++ misc/cgo/testplugin/testdata/issue52937/main.go | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 misc/cgo/testplugin/testdata/issue52937/main.go (limited to 'misc/cgo/testplugin') diff --git a/misc/cgo/testplugin/plugin_test.go b/misc/cgo/testplugin/plugin_test.go index 53e79a4626..74fb866f6f 100644 --- a/misc/cgo/testplugin/plugin_test.go +++ b/misc/cgo/testplugin/plugin_test.go @@ -296,6 +296,10 @@ func TestIssue44956(t *testing.T) { run(t, "./issue44956.exe") } +func TestIssue52937(t *testing.T) { + goCmd(t, "build", "-buildmode=plugin", "-o", "issue52937.so", "./issue52937/main.go") +} + func TestForkExec(t *testing.T) { // Issue 38824: importing the plugin package causes it hang in forkExec on darwin. diff --git a/misc/cgo/testplugin/testdata/issue52937/main.go b/misc/cgo/testplugin/testdata/issue52937/main.go new file mode 100644 index 0000000000..66f09effea --- /dev/null +++ b/misc/cgo/testplugin/testdata/issue52937/main.go @@ -0,0 +1,9 @@ +// 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 + +func main() {} +func F[T any]() {} +func G[T any](T) {} -- cgit v1.3-5-g9baa