aboutsummaryrefslogtreecommitdiff
path: root/misc/ios
diff options
context:
space:
mode:
authorElias Naur <elias.naur@gmail.com>2017-11-07 13:04:22 +0100
committerBrad Fitzpatrick <bradfitz@golang.org>2017-12-04 17:48:58 +0000
commit03c93eaa0ba19a57ae348ea3f3ff91a1be2ef7fb (patch)
treed3e907bf7b7a90150a9e852b4ed94c56607dd359 /misc/ios
parent1b9f66330b123b042e738eff5e47e869dd301a98 (diff)
downloadgo-03c93eaa0ba19a57ae348ea3f3ff91a1be2ef7fb.tar.gz
go-03c93eaa0ba19a57ae348ea3f3ff91a1be2ef7fb.zip
misc/ios: dump logs for failing lldb sessions to stdout
The iOS test harness dumps the output of its lldb session to stdout, but only if the lldb session was successfully started. Make sure the log is always dumpede, so that lldb startup failures such as lldb setup error: exited (lldb start: exit status 253) can be diagnosed. For the iOS builders. Change-Id: Ie0e3341dd8f84a88d26509c34816668d3ebbfaa0 Reviewed-on: https://go-review.googlesource.com/76195 Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Diffstat (limited to 'misc/ios')
-rw-r--r--misc/ios/go_darwin_arm_exec.go19
1 files changed, 10 insertions, 9 deletions
diff --git a/misc/ios/go_darwin_arm_exec.go b/misc/ios/go_darwin_arm_exec.go
index f1807ae1e0..56dbb009a1 100644
--- a/misc/ios/go_darwin_arm_exec.go
+++ b/misc/ios/go_darwin_arm_exec.go
@@ -232,6 +232,16 @@ func run(bin string, args []string) (err error) {
os.Stdout.Write(b)
}()
+ cond := func(out *buf) bool {
+ i0 := s.out.LastIndex([]byte("(lldb)"))
+ i1 := s.out.LastIndex([]byte("fruitstrap"))
+ i2 := s.out.LastIndex([]byte(" connect"))
+ return i0 > 0 && i1 > 0 && i2 > 0
+ }
+ if err := s.wait("lldb start", cond, 15*time.Second); err != nil {
+ panic(waitPanic{err})
+ }
+
// Script LLDB. Oh dear.
s.do(`process handle SIGHUP --stop false --pass true --notify false`)
s.do(`process handle SIGPIPE --stop false --pass true --notify false`)
@@ -348,15 +358,6 @@ func newSession(appdir string, args []string, opts options) (*lldbSession, error
s.exited <- s.cmd.Wait()
}()
- cond := func(out *buf) bool {
- i0 := s.out.LastIndex([]byte("(lldb)"))
- i1 := s.out.LastIndex([]byte("fruitstrap"))
- i2 := s.out.LastIndex([]byte(" connect"))
- return i0 > 0 && i1 > 0 && i2 > 0
- }
- if err := s.wait("lldb start", cond, 15*time.Second); err != nil {
- panic(waitPanic{err})
- }
return s, nil
}