Commit 704893b1 authored by Elias Naur's avatar Elias Naur

misc/ios: retry iOS launch even if no device app path was found

Now that the iOS exec wrapper uninstalls any existing test app before
installing a new, looking up the device app path might fail. Before,
the lookup always succeeded (even though the path reported might be
stale).

For the iOS builder.

Change-Id: I5667b6fae15f88745bdee796db219a429a26e203
Reviewed-on: https://go-review.googlesource.com/112075
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarHyang-Ah Hana Kim <hyangah@gmail.com>
parent 1b494876
...@@ -469,12 +469,17 @@ func run(appdir, bundleID string, args []string) error { ...@@ -469,12 +469,17 @@ func run(appdir, bundleID string, args []string) error {
} }
attempt := 0 attempt := 0
for { for {
// The device app path is constant for a given installed app, // The device app path reported by the device might be stale, so retry
// but the device might not return a stale device path for // the lookup of the device path along with the lldb launching below.
// a newly overwritten app, so retry the lookup as well.
deviceapp, err := findDeviceAppPath(bundleID) deviceapp, err := findDeviceAppPath(bundleID)
if err != nil { if err != nil {
return err // The device app path might not yet exist for a newly installed app.
if attempt == 5 {
return err
}
attempt++
time.Sleep(5 * time.Second)
continue
} }
lldb := exec.Command( lldb := exec.Command(
"python", "python",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment