1
0
mirror of https://github.com/golang/go synced 2024-09-29 20:14:29 -06:00
go/misc
Elias Naur 78219ab3fe misc/ios: script lldb directly with Python
The iOS exec wrapper uses ios-deploy to set up a device, install
the wrapped app, and start a lldb session to run it. ios-deploy is
not built to be scripted, as can be seen from the brittle way it is
driven by the Go wrapper. There are many timeouts and comments such
as

"
// lldb tries to be clever with terminals.
// So we wrap it in script(1) and be clever
// right back at it.
"

This CL replaces the use of ios-deploy with a lldb driver script in
Python. lldb is designed to be scripted, so apart from getting rid
of the ios-deploy dependency, we gain:

- No timouts and scripting ios-deploy through stdin and parsing
stdout for responses.
- Accurate exit codes.
- Prompt exits when the wrapped binary fails for some reason. Before,
the go test timeout would kick in to fail the test.
- Support for environment variables.
- No noise in the test output. Only the test binary output is output
from the wrapper.

We have to do more work with the lldb driver: mounting the developer
image on the device, running idevicedebugserverproxy and installing
the app. Even so, the CL removes almost as many lines as it adds.
Furthermore, having the steps split up helps to tell setup errors
from runtime errors.

Change-Id: I48cccc32f475d17987283b2c93aacc3da18fe339
Reviewed-on: https://go-review.googlesource.com/107337
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-04-30 16:17:42 +00:00
..
android misc,src: add support for specifying adb flags to the android harness 2018-01-20 21:13:30 +00:00
arm
cgo misc/cgo/test: log error value in testSigprocmask 2018-04-25 20:26:39 +00:00
chrome/gophertool
git
ios misc/ios: script lldb directly with Python 2018-04-30 16:17:42 +00:00
linkcheck
nacl all: use HTTPS for iana.org links 2018-02-13 18:36:48 +00:00
sortac
swig cmd/go: fix swig support and run swig tests during run.bash 2017-11-16 17:19:19 +00:00
trace misc/trace: update trace_viewer_full.html 2018-04-26 20:26:23 +00:00
wasm misc/wasm: wasm_exec: non-zero exit code on compile error 2018-04-27 20:57:51 +00:00
benchcmp
editors