Skip to content

Commit 4f0561f

Browse files
committed
cmd/dist: skip fips140test in exe mode on Android
Android does not support non-PIE linking. Skip the test. Change-Id: I53071538c82f1e1f96eed1a2619f92eacd18d263 Reviewed-on: https://go-review.googlesource.com/c/go/+/637495 Run-TryBot: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
1 parent 87dbfb9 commit 4f0561f

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

‎src/cmd/dist/test.go

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -876,16 +876,18 @@ func (t *tester) registerTests() {
876876
}
877877

878878
if t.extLink() && !t.compileOnly {
879-
t.registerTest("external linking, -buildmode=exe",
880-
&goTest{
881-
variant: "exe_external",
882-
timeout: 60 * time.Second,
883-
buildmode: "exe",
884-
ldflags: "-linkmode=external",
885-
env: []string{"CGO_ENABLED=1"},
886-
pkg: "crypto/internal/fips140test",
887-
runTests: "TestFIPSCheck",
888-
})
879+
if goos != "android" { // Android does not support non-PIE linking
880+
t.registerTest("external linking, -buildmode=exe",
881+
&goTest{
882+
variant: "exe_external",
883+
timeout: 60 * time.Second,
884+
buildmode: "exe",
885+
ldflags: "-linkmode=external",
886+
env: []string{"CGO_ENABLED=1"},
887+
pkg: "crypto/internal/fips140test",
888+
runTests: "TestFIPSCheck",
889+
})
890+
}
889891
if t.externalLinkPIE() && !disablePIE {
890892
t.registerTest("external linking, -buildmode=pie",
891893
&goTest{

0 commit comments

Comments
 (0)