diff --git a/misc/ios/go_darwin_arm_exec.go b/misc/ios/go_darwin_arm_exec.go index cc57adb584a..b49496cc106 100644 --- a/misc/ios/go_darwin_arm_exec.go +++ b/misc/ios/go_darwin_arm_exec.go @@ -100,7 +100,7 @@ func main() { // // The lock file is never deleted, to avoid concurrent locks on distinct // files with the same path. - lockName := filepath.Join(os.TempDir(), "go_darwin_arm_exec.lock") + lockName := filepath.Join(os.TempDir(), "go_darwin_arm_exec-"+deviceID+".lock") lock, err = os.OpenFile(lockName, os.O_CREATE|os.O_RDONLY, 0666) if err != nil { log.Fatal(err) diff --git a/src/iostest.bash b/src/iostest.bash index 595b6757440..00cc49ec7e6 100755 --- a/src/iostest.bash +++ b/src/iostest.bash @@ -32,11 +32,15 @@ if [ "$1" = "-restart" ]; then # Reboot to make sure previous runs do not interfere with the current run. # It is reasonably easy for a bad program leave an iOS device in an # almost unusable state. - idevicediagnostics restart + IDEVARGS= + if [ -n "$GOIOS_DEVICE_ID" ]; then + IDEVARGS="-u $GOIOS_DEVICE_ID" + fi + idevicediagnostics $IDEVARGS restart # Initial sleep to make sure we are restarting before we start polling. sleep 30 # Poll until the device has restarted. - until idevicediagnostics diagnostics; do + until idevicediagnostics $IDEVARGS diagnostics; do # TODO(crawshaw): replace with a test app using go_darwin_arm_exec. echo "waiting for idevice to come online" sleep 10