<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <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#c7">Comment # 7</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>(In reply to <a href="show_bug.cgi?id=148197#c5">comment #5</a>)
<span class="quote">&gt; &gt; Tools/Scripts/webkitpy/port/ios.py:-248
&gt; &gt; -        # testing_device will fail to boot if it is already booted. We assume that if testing_device
&gt; &gt; -        # is booted that it was booted by the iOS Simulator app (as opposed to simctl). So, quit the
&gt; &gt; -        # iOS Simulator app to shutdown testing_device.
&gt; &gt; -        # FIXME: &lt;rdar://problem/20916140&gt; Switch to using CoreSimulator.framework for launching and quitting iOS Simulator
&gt; &gt; -        self._executive.run_command(['osascript', '-e', 'tell application id &quot;com.apple.iphonesimulator&quot; to quit'])
&gt; &gt; -        Simulator.wait_until_device_is_in_state(testing_device.udid, Simulator.DeviceState.SHUTDOWN)
&gt; &gt; -
&gt; 
&gt; Actually, we need this code to handle the scenario where a person launched
&gt; the iOS Simulator with simulator device testing_device and then subsequently
&gt; runs run-webkit-test --ios-simulator (this is implied by the comment on
&gt; lines 242 - 244). So, I suggest that we extract the common code into shared
&gt; function, say _quitIOSSimulator, that we call from both here and
&gt; clean_up_test_run().</span >

Disregard this comment. We also need to move the logic for quitting the simulator from IOSSimulatorPort.check_sys_deps() to IOSSimulatorPort.reset_preferences(). Otherwise, we will hit this bug when a person launches the testing device in iOS Simulator and subsequently runs run-webkit-tests --ios-simulator.</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>