]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/cgo/internal/testcarchive: fix nocgo and no-c-archive builds
authorAustin Clements <austin@google.com>
Fri, 19 May 2023 01:46:55 +0000 (21:46 -0400)
committerGopher Robot <gobot@golang.org>
Fri, 19 May 2023 02:15:30 +0000 (02:15 +0000)
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>
src/cmd/cgo/internal/testcarchive/carchive_test.go

index a367bca2f19af722a813d3a71bbd14f79b7d9942..cdb90fd130a72ba8dbc63482415031af6996e13a 100644 (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 {