misc/cgo: skip cgotest.TestCrossPackageTests on iOS and set PWD

I hope that this will fix the tests on iOS, but 'gomote create' isn't
giving me an instance I can test with. (Please patch and test before
approving.)

Updates #15919
Updates #30228

Change-Id: I1b7cd30d5b127a1ad3243b329fa005d229f69a24
Reviewed-on: https://go-review.googlesource.com/c/163726
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Bryan C. Mills 2019-02-25 22:09:46 -05:00
parent 3cf56e78d8
commit b5a68a9e41
7 changed files with 15 additions and 0 deletions

View file

@ -132,6 +132,7 @@ func testMain(m *testing.M) int {
if err := os.Chdir(modRoot); err != nil {
log.Panic(err)
}
os.Setenv("PWD", modRoot)
if err := ioutil.WriteFile("go.mod", []byte("module testcshared\n"), 0666); err != nil {
log.Panic(err)
}