Skip to content

Commit 03c93ea

Browse files
Elias Naurbradfitz
authored andcommitted
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>
1 parent 1b9f663 commit 03c93ea

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

misc/ios/go_darwin_arm_exec.go

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,16 @@ func run(bin string, args []string) (err error) {
232232
os.Stdout.Write(b)
233233
}()
234234

235+
cond := func(out *buf) bool {
236+
i0 := s.out.LastIndex([]byte("(lldb)"))
237+
i1 := s.out.LastIndex([]byte("fruitstrap"))
238+
i2 := s.out.LastIndex([]byte(" connect"))
239+
return i0 > 0 && i1 > 0 && i2 > 0
240+
}
241+
if err := s.wait("lldb start", cond, 15*time.Second); err != nil {
242+
panic(waitPanic{err})
243+
}
244+
235245
// Script LLDB. Oh dear.
236246
s.do(`process handle SIGHUP --stop false --pass true --notify false`)
237247
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
348358
s.exited <- s.cmd.Wait()
349359
}()
350360

351-
cond := func(out *buf) bool {
352-
i0 := s.out.LastIndex([]byte("(lldb)"))
353-
i1 := s.out.LastIndex([]byte("fruitstrap"))
354-
i2 := s.out.LastIndex([]byte(" connect"))
355-
return i0 > 0 && i1 > 0 && i2 > 0
356-
}
357-
if err := s.wait("lldb start", cond, 15*time.Second); err != nil {
358-
panic(waitPanic{err})
359-
}
360361
return s, nil
361362
}
362363

0 commit comments

Comments
 (0)