]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: skip fips140test in exe mode on Android
authorCherry Mui <cherryyz@google.com>
Wed, 18 Dec 2024 16:28:18 +0000 (11:28 -0500)
committerCherry Mui <cherryyz@google.com>
Thu, 19 Dec 2024 04:48:37 +0000 (20:48 -0800)
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>

src/cmd/dist/test.go

index 5a981f8bc147decb25101547f4f87dda5a6ec86b..06bd01bc5bb9954cc382b518913b81f9e7b69cd1 100644 (file)
@@ -876,16 +876,18 @@ func (t *tester) registerTests() {
        }
 
        if t.extLink() && !t.compileOnly {
-               t.registerTest("external linking, -buildmode=exe",
-                       &goTest{
-                               variant:   "exe_external",
-                               timeout:   60 * time.Second,
-                               buildmode: "exe",
-                               ldflags:   "-linkmode=external",
-                               env:       []string{"CGO_ENABLED=1"},
-                               pkg:       "crypto/internal/fips140test",
-                               runTests:  "TestFIPSCheck",
-                       })
+               if goos != "android" { // Android does not support non-PIE linking
+                       t.registerTest("external linking, -buildmode=exe",
+                               &goTest{
+                                       variant:   "exe_external",
+                                       timeout:   60 * time.Second,
+                                       buildmode: "exe",
+                                       ldflags:   "-linkmode=external",
+                                       env:       []string{"CGO_ENABLED=1"},
+                                       pkg:       "crypto/internal/fips140test",
+                                       runTests:  "TestFIPSCheck",
+                               })
+               }
                if t.externalLinkPIE() && !disablePIE {
                        t.registerTest("external linking, -buildmode=pie",
                                &goTest{