]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/cmd/link/dwarf_test.go
[dev.link] all: merge branch 'master' into dev.link
[gostls13.git] / src / cmd / link / dwarf_test.go
index a9f58db230a3f459bda45457426e68b9858d7072..ac6937ced02725a474e2b2b4f41d48d1681ca6a8 100644 (file)
@@ -191,6 +191,13 @@ func TestDWARFiOS(t *testing.T) {
        if err := exec.Command("xcrun", "--help").Run(); err != nil {
                t.Skipf("error running xcrun, required for iOS cross build: %v", err)
        }
+       // Check to see if the ios tools are installed. It's possible to have the command line tools
+       // installed without the iOS sdk.
+       if output, err := exec.Command("xcodebuild -showsdks").CombinedOutput(); err != nil {
+               t.Skipf("error running xcodebuild, required for iOS cross build: %v", err)
+       } else if !strings.Contains(string(output), "iOS SDK") {
+               t.Skipf("iOS SDK not detected.")
+       }
        cc := "CC=" + runtime.GOROOT() + "/misc/ios/clangwrap.sh"
        // iOS doesn't allow unmapped segments, so iOS executables don't have DWARF.
        testDWARF(t, "", false, cc, "CGO_ENABLED=1", "GOOS=darwin", "GOARCH=arm64")