Skip to content

Commit 8fc1f3c

Browse files
committed
build: Exclude linux-specific crypto/rand tests.
Since the package files are excluded too, the tests can't compile. Fixes: ../../../usr/local/go/src/crypto/rand/rand_linux_test.go:13:17: undeclared name: batched ../../../usr/local/go/src/crypto/rand/rand_linux_test.go:31:7: undeclared name: batched ../../../usr/local/go/src/crypto/rand/rand_linux_test.go:38:7: undeclared name: batched
1 parent 7c7c569 commit 8fc1f3c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

build/build.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ func importWithSrcDir(path string, srcDir string, mode build.ImportMode, install
115115
pkg.GoFiles = exclude(pkg.GoFiles, "fd_poll_runtime.go")
116116
case "crypto/rand":
117117
pkg.GoFiles = []string{"rand.go", "util.go"}
118+
pkg.TestGoFiles = exclude(pkg.TestGoFiles, "rand_linux_test.go") // Don't want linux-specific tests (since linux-specific package files are excluded too).
118119
}
119120

120121
if len(pkg.CgoFiles) > 0 {

0 commit comments

Comments
 (0)