aboutsummaryrefslogtreecommitdiff
path: root/misc/go_android_exec
AgeCommit message (Collapse)Author
2023-08-21os: add tests for UserCacheDir and UserConfigDirJosh Kraft
Adds basic test scenarios for UserCacheDir and UserConfigDir. Fixes #57638 Change-Id: Ieb86e95faff44287bfa13daa0cb26e7b5401373b Reviewed-on: https://go-review.googlesource.com/c/go/+/520262 Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Bypass: Bryan Mills <bcmills@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com>
2023-05-03misc/android: improve exit code workaroundAustin Clements
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>
2023-05-01misc/android: copy entire modules in module modeBryan C. Mills
Change-Id: I8a8aea4d4b9824b53f17bff160055c0d9d2960ff Reviewed-on: https://go-review.googlesource.com/c/go/+/488655 Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2023-05-01misc/android: rename to misc/go_android_exec, make go build workAustin Clements
This makes it reasonable to "go build" from this directory by changing the name of the directory to a more reasonable name for the binary and dropping the unnecessary "ignore" build tag. The resulting binary doesn't *quite* have the necessary name for a Go exec wrapper because that needs to have the form, go_android_$GOARCH_exec, but it's close. Change-Id: I036cb1af9c034462a952b176a794526fa3ffd1ab Reviewed-on: https://go-review.googlesource.com/c/go/+/490495 Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Austin Clements <austin@google.com> Auto-Submit: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>