From: Elias Naur Date: Mon, 17 Apr 2017 19:09:56 +0000 (+0200) Subject: misc/ios: fix the Test386EndToEnd test on iOS X-Git-Tag: go1.9beta1~661 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=69182885d9bbb6329be0583ab190521d0d1fc6da;p=gostls13.git misc/ios: fix the Test386EndToEnd test on iOS Some tests need the src/runtime/textflag.h file. Make sure it is included in iOS test runs. Change-Id: I5e0e7ebe85679686ef15a7d336f28ac9b68a587a Reviewed-on: https://go-review.googlesource.com/40915 Run-TryBot: Elias Naur Reviewed-by: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/misc/ios/go_darwin_arm_exec.go b/misc/ios/go_darwin_arm_exec.go index 46e3fcbc43..aac5e9d760 100644 --- a/misc/ios/go_darwin_arm_exec.go +++ b/misc/ios/go_darwin_arm_exec.go @@ -517,13 +517,13 @@ func copyLocalData(dstbase string) (pkgpath string, err error) { } } - // Copy timezone file. - // - // Typical apps have the zoneinfo.zip in the root of their app bundle, - // read by the time package as the working directory at initialization. - // As we move the working directory to the GOROOT pkg directory, we - // install the zoneinfo.zip file in the pkgpath. if underGoRoot { + // Copy timezone file. + // + // Typical apps have the zoneinfo.zip in the root of their app bundle, + // read by the time package as the working directory at initialization. + // As we move the working directory to the GOROOT pkg directory, we + // install the zoneinfo.zip file in the pkgpath. err := cp( filepath.Join(dstbase, pkgpath), filepath.Join(cwd, "lib", "time", "zoneinfo.zip"), @@ -531,6 +531,19 @@ func copyLocalData(dstbase string) (pkgpath string, err error) { if err != nil { return "", err } + // Copy src/runtime/textflag.h for (at least) Test386EndToEnd in + // cmd/asm/internal/asm. + runtimePath := filepath.Join(dstbase, "src", "runtime") + if err := os.MkdirAll(runtimePath, 0755); err != nil { + return "", err + } + err = cp( + filepath.Join(runtimePath, "textflag.h"), + filepath.Join(cwd, "src", "runtime", "textflag.h"), + ) + if err != nil { + return "", err + } } return finalPkgpath, nil