diff options
author | Elias Naur <elias.naur@gmail.com> | 2017-04-17 21:09:56 +0200 |
---|---|---|
committer | Elias Naur <elias.naur@gmail.com> | 2017-04-17 19:55:54 +0000 |
commit | 69182885d9bbb6329be0583ab190521d0d1fc6da (patch) | |
tree | 5cd2cea44834dd3faf78723165348804c7a59f97 /misc/ios | |
parent | 2c1bff6e0681ff2cace0f69c28b05f47d4262aa3 (diff) | |
download | go-69182885d9bbb6329be0583ab190521d0d1fc6da.tar.gz go-69182885d9bbb6329be0583ab190521d0d1fc6da.zip |
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 <elias.naur@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'misc/ios')
-rw-r--r-- | misc/ios/go_darwin_arm_exec.go | 25 |
1 files changed, 19 insertions, 6 deletions
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 |