Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/dist: enable misc/cgo/* tests on android/iOS #15919

Closed
hyangah opened this issue Jun 1, 2016 · 10 comments
Closed

cmd/dist: enable misc/cgo/* tests on android/iOS #15919

hyangah opened this issue Jun 1, 2016 · 10 comments
Labels
NeedsFix The path to resolution is known, but the work has not been done. OS-Android OS-iOS GOOS=ios
Milestone

Comments

@hyangah
Copy link
Contributor

hyangah commented Jun 1, 2016

many of cgo tests still remain disabled on android/ios, which prevents from detecting bugs early.
See grep -r android src/cmd/dist/test.go
Re-enable them.

@hyangah hyangah added this to the Unreleased milestone Jun 1, 2016
@gopherbot
Copy link

CL https://golang.org/cl/23634 mentions this issue.

@gopherbot
Copy link

CL https://golang.org/cl/23635 mentions this issue.

gopherbot pushed a commit that referenced this issue Jun 1, 2016
Some tests cannot build for Android; use build tags and stubs to
skip them.

For #15919

Change-Id: Ieedcb73d4cabe23c3775cfb1d44c1276982dccd9
Reviewed-on: https://go-review.googlesource.com/23634
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
mk0x9 pushed a commit to mk0x9/go that referenced this issue Jun 2, 2016
For golang#15919

Change-Id: I9fc38d9c8a9cc9406b551315e1599750fe212d0d
Reviewed-on: https://go-review.googlesource.com/23635
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@gopherbot
Copy link

Change https://golang.org/cl/163726 mentions this issue: misc/cgo: skip cgotest.TestCrossPackageTests on iOS and set PWD

gopherbot pushed a commit that referenced this issue Feb 26, 2019
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>
@aclements
Copy link
Member

I recently discovered that some cgo tests appear to be enabled for Android in cmd/dist, but actually do nothing. For example, misc/cgo/stdio and misc/cgo/life are run on Android, but then immediately t.Skip.

@gopherbot
Copy link

Change https://go.dev/cl/489196 mentions this issue: misc/cgo: enable more cgo tests on Android

@gopherbot
Copy link

Change https://go.dev/cl/489495 mentions this issue: internal/testenv: abstract exec wrapper command into testenv

@gopherbot
Copy link

Change https://go.dev/cl/489496 mentions this issue: misc/cgo/errors: enable on Android

@gopherbot
Copy link

Change https://go.dev/cl/488975 mentions this issue: misc/android: improve exit code workaround

@gopherbot
Copy link

Change https://go.dev/cl/489437 mentions this issue: cmd/dist: enable more cgo tests on iOS

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. OS-Android OS-iOS GOOS=ios labels Apr 28, 2023
gopherbot pushed a commit that referenced this issue May 3, 2023
go_android_exec gets the exit status of the process run inside the
Android emulator by sending a small shell script that runs the desired
command and then prints "exitcode=" followed by the exit code. This is
necessary because adb does not reliably pass through the exit status
of the subprocess.

An old bug about this
(https://code.google.com/p/android/issues/detail?id=3254) was closed
in 2016 as fixed in Android N (7.0), but it seems that the adb on the
Android builder at least still sometimes fails to pass through the
exit code.

Unfortunately, this workaround has the effect of injecting
"exitcode=N" into the output of the subprocess it runs, which messes
up tests that are looking for golden output from a subprocess.

Fix this by inserting a filter Writer that looks for the final
"exitcode=N" and strips it from the exec wrapper's own stdout.

For #15919.

This will help us in cleaning up "host tests" for #37486.

Change-Id: I9859f5b215e0ec4a7e33ada04a1857f3cfaf55ae
Reviewed-on: https://go-review.googlesource.com/c/go/+/488975
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
@gopherbot
Copy link

Change https://go.dev/cl/495918 mentions this issue: cmd/dist: refine test conditions and enable more cgo tests on Android, iOS

@dmitshur dmitshur modified the milestones: Unreleased, Go1.21 May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done. OS-Android OS-iOS GOOS=ios
Projects
None yet
Development

No branches or pull requests

4 participants