]> Cypherpunks repositories - gostls13.git/commitdiff
misc/cgo/testshared: pass the testing.T to goCmd when available
authorBryan C. Mills <bcmills@google.com>
Thu, 7 Oct 2021 15:20:05 +0000 (11:20 -0400)
committerBryan C. Mills <bcmills@google.com>
Fri, 8 Oct 2021 15:27:20 +0000 (15:27 +0000)
Noticed while investigating the test failure in
https://build.golang.org/log/4fc4aa11087c74bb8f66c81a8b212f41fb495be4.

Change-Id: I0ed80dad99d6920a187af4339e437a08fbe91ade
Reviewed-on: https://go-review.googlesource.com/c/go/+/354572
Trust: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
misc/cgo/testshared/shared_test.go

index e77f84891543f584ccb5bd2aa538f0e6237e9d17..1bd89bc27ab462c47b0cbfb959acdb81bfe736b4 100644 (file)
@@ -1033,7 +1033,7 @@ func TestGlobal(t *testing.T) {
 // Run a test using -linkshared of an installed shared package.
 // Issue 26400.
 func TestTestInstalledShared(t *testing.T) {
-       goCmd(nil, "test", "-linkshared", "-test.short", "sync/atomic")
+       goCmd(t, "test", "-linkshared", "-test.short", "sync/atomic")
 }
 
 // Test generated pointer method with -linkshared.
@@ -1045,8 +1045,8 @@ func TestGeneratedMethod(t *testing.T) {
 // Test use of shared library struct with generated hash function.
 // Issue 30768.
 func TestGeneratedHash(t *testing.T) {
-       goCmd(nil, "install", "-buildmode=shared", "-linkshared", "./issue30768/issue30768lib")
-       goCmd(nil, "test", "-linkshared", "./issue30768")
+       goCmd(t, "install", "-buildmode=shared", "-linkshared", "./issue30768/issue30768lib")
+       goCmd(t, "test", "-linkshared", "./issue30768")
 }
 
 // Test that packages can be added not in dependency order (here a depends on b, and a adds