<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:dbates&#64;webkit.org" title="Daniel Bates &lt;dbates&#64;webkit.org&gt;"> <span class="fn">Daniel Bates</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - iOS Simulator layout-tests fail to start while cleaning a directory structure if simulator is already running"
   href="https://bugs.webkit.org/show_bug.cgi?id=148197">bug 148197</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #259560 Flags</td>
           <td>review?, commit-queue?
           </td>
           <td>review-, commit-queue-
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - iOS Simulator layout-tests fail to start while cleaning a directory structure if simulator is already running"
   href="https://bugs.webkit.org/show_bug.cgi?id=148197#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - iOS Simulator layout-tests fail to start while cleaning a directory structure if simulator is already running"
   href="https://bugs.webkit.org/show_bug.cgi?id=148197">bug 148197</a>
              from <span class="vcard"><a class="email" href="mailto:dbates&#64;webkit.org" title="Daniel Bates &lt;dbates&#64;webkit.org&gt;"> <span class="fn">Daniel Bates</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=259560&amp;action=diff" name="attach_259560" title="Proposed patch">attachment 259560</a> <a href="attachment.cgi?id=259560&amp;action=edit" title="Proposed patch">[details]</a></span>
Proposed patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=259560&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=259560&amp;action=review</a>

<span class="quote">&gt; Tools/BuildSlaveSupport/kill-old-processes:88
&gt; +        &quot;Simulator&quot;  #FIXME: Consider moving iOS-Specific tasks to their own list</span >

Please put a space character after the '#', substitute &quot;specific&quot; for &quot;Specific&quot; and add a period to the end of this sentence.

<span class="quote">&gt; Tools/Scripts/webkitpy/port/ios.py:-248
&gt; -        # testing_device will fail to boot if it is already booted. We assume that if testing_device
&gt; -        # is booted that it was booted by the iOS Simulator app (as opposed to simctl). So, quit the
&gt; -        # iOS Simulator app to shutdown testing_device.
&gt; -        # FIXME: &lt;rdar://problem/20916140&gt; Switch to using CoreSimulator.framework for launching and quitting iOS Simulator
&gt; -        self._executive.run_command(['osascript', '-e', 'tell application id &quot;com.apple.iphonesimulator&quot; to quit'])
&gt; -        Simulator.wait_until_device_is_in_state(testing_device.udid, Simulator.DeviceState.SHUTDOWN)
&gt; -</span >

Actually, we need this code to handle the scenario where a person launched the iOS Simulator with simulator device testing_device and then subsequently runs run-webkit-test --ios-simulator (this is implied by the comment on lines 242 - 244). So, I suggest that we extract the common code into shared function, say _quitIOSSimulator, that we call from both here and clean_up_test_run(). Maybe something like:

def _quitIOSSimulator(self):
    # FIXME: &lt;rdar://problem/20916140&gt; Switch to using CoreSimulator.framework for launching and quitting iOS Simulator
    self._executive.run_command(['osascript', '-e', 'tell application id &quot;com.apple.iphonesimulator&quot; to quit'])</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>