cmd/cgo/internal/testcarchive: fix nocgo and no-c-archive builds

CL 495918 enabled testcarchive much more widely and added many dynamic
test skips. CL 495855 added TestDeepStack before these dynamic skips
were in. Unfortunately, the two CLs don't logically commute, so when
CL 495918 landed, it broke at least nocgo builders and platforms that
don't support c-archive builds. Fix this by adding the necessary skips
to TestDeepStack.

Change-Id: I3d352f731fe67a01c7b96871fde772db8eb21b5d
Reviewed-on: https://go-review.googlesource.com/c/go/+/496376
Auto-Submit: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
This commit is contained in:
Austin Clements 2023-05-18 21:46:55 -04:00 committed by Gopher Robot
parent 4088e97fc2
commit 8f1031df77
1 changed files with 4 additions and 0 deletions

View File

@ -1292,6 +1292,10 @@ func TestPreemption(t *testing.T) {
// Issue 59294. Test calling Go function from C after using some
// stack space.
func TestDeepStack(t *testing.T) {
testenv.MustHaveGoBuild(t)
testenv.MustHaveCGO(t)
testenv.MustHaveBuildMode(t, "c-archive")
t.Parallel()
if !testWork {