<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>189702</bug_id>
          
          <creation_ts>2018-09-18 10:28:05 -0700</creation_ts>
          <short_desc>webkitpy: Clobbering and building occurs multiple times for iOS Simulator ports</short_desc>
          <delta_ts>2018-09-27 08:46:29 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=189623</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jonathan Bedard">jbedard</reporter>
          <assigned_to name="Jonathan Bedard">jbedard</assigned_to>
          <cc>aakash_jain</cc>
    
    <cc>commit-queue</cc>
    
    <cc>dbates</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>glenn</cc>
    
    <cc>lforschler</cc>
    
    <cc>ryanhaddad</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1460637</commentid>
    <comment_count>0</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2018-09-18 10:28:05 -0700</bug_when>
    <thetext>Currently, we clobber old results and and build in the _set_up_run function, which is run multiple times per run for the iOS simulator.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1460638</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2018-09-18 10:28:16 -0700</bug_when>
    <thetext>&lt;rdar://problem/44541704&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1460639</commentid>
    <comment_count>2</comment_count>
      <attachid>350031</attachid>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2018-09-18 10:29:34 -0700</bug_when>
    <thetext>Created attachment 350031
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1460647</commentid>
    <comment_count>3</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2018-09-18 10:43:33 -0700</bug_when>
    <thetext>Waiting for EWS since my local testing was limited.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1460691</commentid>
    <comment_count>4</comment_count>
      <attachid>350031</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-09-18 13:10:41 -0700</bug_when>
    <thetext>Comment on attachment 350031
Patch

Clearing flags on attachment: 350031

Committed r236151: &lt;https://trac.webkit.org/changeset/236151&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1460692</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-09-18 13:10:43 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1460693</commentid>
    <comment_count>6</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-09-18 13:11:40 -0700</bug_when>
    <thetext>&lt;rdar://problem/44572385&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1462463</commentid>
    <comment_count>7</comment_count>
      <attachid>350031</attachid>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2018-09-22 20:06:06 -0700</bug_when>
    <thetext>Comment on attachment 350031
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=350031&amp;action=review

&gt; Tools/Scripts/webkitpy/layout_tests/controllers/manager.py:-167
&gt; -        self._printer.write_update(&quot;Checking build ...&quot;)
&gt; -        if not self._port.check_build():
&gt; -            _log.error(&quot;Build check failed&quot;)
&gt; -            return False
&gt; -

Does run-webkit-tests on Mac run the tests if you perform a clean build of the WebKit stack and not the tools? This removal does not seem correct or does not seem correct for Mac. What guarantees that LayoutTestHelper was built before we try to launch it below? Even if we are guaranteed it to be built in advance it seems unintuitive that we moved this logic from this function, used to setup a run, to the function that is responsible for running the test. Maybe we have to do this for iOS, but then it may be better to make iOS the exception that it is than to modify all ports to fit iOS&apos;s weird model of the world.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1462464</commentid>
    <comment_count>8</comment_count>
      <attachid>350031</attachid>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2018-09-22 20:08:56 -0700</bug_when>
    <thetext>Comment on attachment 350031
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=350031&amp;action=review

&gt; Tools/Scripts/webkitpy/layout_tests/controllers/manager.py:240
&gt; +        if self._options.clobber_old_results:
&gt; +            self._clobber_old_results()
&gt; +
&gt; +        # Create the output directory if it doesn&apos;t already exist.
&gt; +        self._port.host.filesystem.maybe_make_directory(self._results_directory)

Similarly this seems unintuitive. If this is necessary to fix iOS then make iOS the exception (and have dedicated conditional branches or a dedicated code path) and not make a mess of the code for all the other ports.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1463966</commentid>
    <comment_count>9</comment_count>
      <attachid>350031</attachid>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2018-09-27 08:46:29 -0700</bug_when>
    <thetext>Comment on attachment 350031
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=350031&amp;action=review

&gt;&gt; Tools/Scripts/webkitpy/layout_tests/controllers/manager.py:-167
&gt;&gt; -
&gt; 
&gt; Does run-webkit-tests on Mac run the tests if you perform a clean build of the WebKit stack and not the tools? This removal does not seem correct or does not seem correct for Mac. What guarantees that LayoutTestHelper was built before we try to launch it below? Even if we are guaranteed it to be built in advance it seems unintuitive that we moved this logic from this function, used to setup a run, to the function that is responsible for running the test. Maybe we have to do this for iOS, but then it may be better to make iOS the exception that it is than to modify all ports to fit iOS&apos;s weird model of the world.

This function starts with an _. That indicates that it should be a private function and other classes shouldn&apos;t be calling it directly. This code wasn&apos;t removed, it was MOVED. We still run it. Just not multiple times.

All this change does is move this code so we don&apos;t do this multiple times during a single instantiation of run-webkit-tests for iOS Simulator. Since we&apos;ve already established long ago that a single instantiation of run-webkit-tests may contain multiple sequential runs, it doesn&apos;t make sense for this code to be in _set_up_run(...), we only need it to be run once per instantiation of run-webkit-test.

It&apos;s also not just an iOS problem anymore because watchOS uses exactly the same model as iOS.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>350031</attachid>
            <date>2018-09-18 10:29:34 -0700</date>
            <delta_ts>2018-09-18 13:10:41 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-189702-20180918102933.patch</filename>
            <type>text/plain</type>
            <size>2957</size>
            <attacher name="Jonathan Bedard">jbedard</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDIzNjE0NCkKKysrIFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwz
ICsxLDE2IEBACisyMDE4LTA5LTE4ICBKb25hdGhhbiBCZWRhcmQgIDxqYmVkYXJkQGFwcGxlLmNv
bT4KKworICAgICAgICB3ZWJraXRweTogQ2xvYmJlcmluZyBhbmQgYnVpbGRpbmcgb2NjdXJzIG11
bHRpcGxlIHRpbWVzIGZvciBpT1MgU2ltdWxhdG9yIHBvcnRzCisgICAgICAgIGh0dHBz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3lzdGVtLm1heWJlX21ha2VfZGlyZWN0b3J5
KHNlbGYuX3Jlc3VsdHNfZGlyZWN0b3J5KQorCiAgICAgICAgIGlmIGRlZmF1bHRfZGV2aWNlX3Rl
c3RzOgogICAgICAgICAgICAgX2xvZy5pbmZvKCcnKQogICAgICAgICAgICAgX2xvZy5pbmZvKCJS
dW5uaW5nICVzIiwgcGx1cmFsaXplKGxlbih0ZXN0c190b19ydW4pLCAidGVzdCIpKQo=
</data>

          </attachment>
      

    </bug>

</bugzilla>