Changes method of quitting iOS Simulator to be more correct.
authorjacob_nielsen@apple.com <jacob_nielsen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Apr 2015 01:28:45 +0000 (01:28 +0000)
committerjacob_nielsen@apple.com <jacob_nielsen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Apr 2015 01:28:45 +0000 (01:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=143847
<rdar://problem/20530344>

Reviewed by Darin Adler.

Fixes by addressing the app by ID rather than by name.

* Scripts/webkitdirs.pm:
(quitIOSSimulator):
* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.check_sys_deps):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182937 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitdirs.pm
Tools/Scripts/webkitpy/port/ios.py

index 2f211fe..5a09728 100644 (file)
@@ -1,3 +1,18 @@
+2015-04-16  Jake Nielsen  <jacob_nielsen@apple.com>
+
+        Changes method of quitting iOS Simulator to be more correct.
+        https://bugs.webkit.org/show_bug.cgi?id=143847
+        <rdar://problem/20530344>
+
+        Reviewed by Darin Adler.
+
+        Fixes by addressing the app by ID rather than by name.
+
+        * Scripts/webkitdirs.pm:
+        (quitIOSSimulator):
+        * Scripts/webkitpy/port/ios.py:
+        (IOSSimulatorPort.check_sys_deps):
+
 2015-04-16  Anders Carlsson  <andersca@apple.com>
 
         Deprecate _WKWebsiteDataStore in favor of WKWebsiteDataStore
index 7346b8c..a406c93 100755 (executable)
@@ -2125,7 +2125,7 @@ sub relaunchIOSSimulator($)
 sub quitIOSSimulator(;$)
 {
     my ($waitForShutdownOfSimulatedDeviceUDID) = @_;
-    exitStatus(system {"osascript"} "osascript", "-e", 'tell application "iOS Simulator" to quit') == 0 or die "Failed to quit iOS Simulator: $!";
+    exitStatus(system {"osascript"} "osascript", "-e", 'tell application id "com.apple.iphonesimulator" to quit') == 0 or die "Failed to quit iOS Simulator: $!";
     if (!defined($waitForShutdownOfSimulatedDeviceUDID)) {
         return;
     }
index f477410..cac2674 100644 (file)
@@ -248,7 +248,7 @@ class IOSSimulatorPort(Port):
         # testing_device will fail to boot if it is already booted. We assume that if testing_device
         # is booted that it was booted by the iOS Simulator app (as opposed to simctl). So, quit the
         # iOS Simulator app to shutdown testing_device.
-        self._executive.run_command(['osascript', '-e', 'tell application "iOS Simulator" to quit'])
+        self._executive.run_command(['osascript', '-e', 'tell application id "com.apple.iphonesimulator" to quit'])
         Simulator.wait_until_device_is_in_state(testing_device.udid, Simulator.DeviceState.SHUTDOWN)
 
         if not Simulator.check_simulator_device_and_erase_if_needed(self.host, testing_device.udid):