mirror of
https://github.com/golang/go
synced 2024-11-26 04:58:00 -07:00
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>
This commit is contained in:
parent
2c1bff6e06
commit
69182885d9
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user