• Elias Naur's avatar
    misc/ios: script lldb directly with Python · 78219ab3
    Elias Naur authored
    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: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    78219ab3
Name
Last commit
Last update
..
android Loading commit data...
arm Loading commit data...
cgo Loading commit data...
chrome/gophertool Loading commit data...
git Loading commit data...
ios Loading commit data...
linkcheck Loading commit data...
nacl Loading commit data...
sortac Loading commit data...
swig Loading commit data...
trace Loading commit data...
wasm Loading commit data...
benchcmp Loading commit data...
editors Loading commit data...