<?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>140787</bug_id>
          
          <creation_ts>2015-01-22 14:07:31 -0800</creation_ts>
          <short_desc>test-webkitpy: webkitpy.tool.commands.earlywarningsystem_unittest.EarlyWarningSystemTest.test_ewses fails on EFL, GTK, Win ports</short_desc>
          <delta_ts>2022-02-28 04:13:05 -0800</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>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>140476</dependson>
    
    <dependson>140637</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Kilzer (:ddkilzer)">ddkilzer</reporter>
          <assigned_to name="David Kilzer (:ddkilzer)">ddkilzer</assigned_to>
          <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cgarcia</cc>
    
    <cc>commit-queue</cc>
    
    <cc>dbates</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>glenn</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>jake.nielsen.webkit</cc>
    
    <cc>mrobinson</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1063452</commentid>
    <comment_count>0</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2015-01-22 14:07:31 -0800</bug_when>
    <thetext>The webkitpy.tool.commands.earlywarningsystem_unittest.EarlyWarningSystemTest.test_ewses test still fails on EFL, GTK and Win ports:

[1231/1425] webkitpy.tool.commands.earlywarningsystem_unittest.EarlyWarningSystemTest.test_ewses
[1232/1425] webkitpy.tool.commands.earlywarningsystem_unittest.EarlyWarningSystemTest.test_ewses erred:
  Traceback (most recent call last):
    File &quot;/home/buildbot/slave/win-release-tests/build/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py&quot;, line 100, in test_ewses
      self._test_ews(ews_class())
    File &quot;/home/buildbot/slave/win-release-tests/build/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py&quot;, line 93, in _test_ews
      self.assert_queue_outputs(ews, expected_logs=self._default_expected_logs(ews), options=options)
    File &quot;/home/buildbot/slave/win-release-tests/build/Tools/Scripts/webkitpy/tool/commands/queuestest.py&quot;, line 100, in assert_queue_outputs
      self.assert_outputs(queue.begin_work_queue, &quot;begin_work_queue&quot;, [], expected_stdout, expected_stderr, expected_exceptions, expected_logs)
    File &quot;/home/buildbot/slave/win-release-tests/build/Tools/Scripts/webkitpy/tool/commands/queuestest.py&quot;, line 66, in assert_outputs
      expected_logs=logs)
    File &quot;/home/buildbot/slave/win-release-tests/build/Tools/Scripts/webkitpy/common/system/outputcapture.py&quot;, line 93, in assert_outputs
      return_value = function(*args, **kwargs)
    File &quot;/home/buildbot/slave/win-release-tests/build/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py&quot;, line 56, in begin_work_queue
      AbstractReviewQueue.begin_work_queue(self)
    File &quot;/home/buildbot/slave/win-release-tests/build/Tools/Scripts/webkitpy/tool/commands/queues.py&quot;, line 435, in begin_work_queue
      PatchProcessingQueue.begin_work_queue(self)
    File &quot;/home/buildbot/slave/win-release-tests/build/Tools/Scripts/webkitpy/tool/commands/queues.py&quot;, line 281, in begin_work_queue
      self._port = self._tool.port_factory.get(self._new_port_name_from_old(self.port_name, self._tool.platform))
    File &quot;/home/buildbot/slave/win-release-tests/build/Tools/Scripts/webkitpy/port/factory.py&quot;, line 126, in get
      port_name = cls.determine_full_port_name(self._host, options, port_name)
    File &quot;/home/buildbot/slave/win-release-tests/build/Tools/Scripts/webkitpy/port/ios.py&quot;, line 57, in determine_full_port_name
      sdk_command_output = subprocess.check_output([&apos;/usr/bin/xcrun&apos;, &apos;--sdk&apos;, &apos;iphoneos&apos;, &apos;--show-sdk-version&apos;], stderr=None).rstrip()
    File &quot;/usr/lib/python2.7/subprocess.py&quot;, line 537, in check_output
      process = Popen(stdout=PIPE, *popenargs, **kwargs)
    File &quot;/usr/lib/python2.7/subprocess.py&quot;, line 679, in __init__
      errread, errwrite)
    File &quot;/usr/lib/python2.7/subprocess.py&quot;, line 1249, in _execute_child
      raise child_exception
  OSError: [Errno 2] No such file or directory

The fix is to make sure the &quot;xcrun&quot; command never runs on a port that doesn&apos;t have an iOS SDK installed.  (The check I added earlier for running on a Mac host was apparently insufficient.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1063453</commentid>
    <comment_count>1</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2015-01-22 14:10:11 -0800</bug_when>
    <thetext>Failures:

EFL: &lt;https://build.webkit.org/builders/EFL%20Linux%2064-bit%20Release%20WK2/builds/19168/steps/webkitpy-test/logs/stdio&gt;
GTK: &lt;https://build.webkit.org/builders/GTK%20Linux%2032-bit%20Release/builds/49743/steps/webkitpy-test/logs/stdio&gt;
Win: &lt;https://build.webkit.org/builders/Apple%20Win%207%20Release%20%28Tests%29/builds/49187/steps/webkitpy-test/logs/stdio&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1063572</commentid>
    <comment_count>2</comment_count>
      <attachid>245194</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2015-01-22 19:19:10 -0800</bug_when>
    <thetext>Created attachment 245194
Patch v1 (speculative fix)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1063602</commentid>
    <comment_count>3</comment_count>
      <attachid>245194</attachid>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2015-01-22 22:00:35 -0800</bug_when>
    <thetext>Comment on attachment 245194
Patch v1 (speculative fix)

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

&gt; Tools/Scripts/webkitpy/port/ios.py:59
&gt; -            if host.platform.is_mac():
&gt; +            if os.path.isfile(&apos;/usr/bin/xcrun&apos;):
&gt;                  sdk_command_output = subprocess.check_output([&apos;/usr/bin/xcrun&apos;, &apos;--sdk&apos;, &apos;iphoneos&apos;, &apos;--show-sdk-version&apos;], stderr=None).rstrip()
&gt;                  if sdk_command_output:
&gt;                      sdk_version = sdk_command_output

OK. You may want to consider adding a FIXME comment that indicates that we check for the presence of /usr/bin/xcrun as a workaround for the unit test webkitpy.tool.commands.earlywarningsystem_unittest.EarlyWarningSystemTest.test_ewses.

Maybe a better way to fix this issue is to extract the logic to query the iphoneos SDK version in IOSPort.determine_full_port_name() into a method in class PlatformInfo called iphoneSDKVersion() (or you could create a more generic function xcodeSDKVersion(sdk_name) or sdkVersion(sdk_name) that takes a string that represents that name of the SDK to lookup and returns the version of the SDK if it exists and an error value (None?) if the SDK doesn&apos;t exist). Similar to the implementation of PlatformInfo.total_bytes_memory(), PlatformInfo.iphoneSDKVersion() would call /usr/bin/xcrun --sdk iphoneos on Mac. Otherwise it would return some error value (None?). We would add an analogous method to class MockPlatformInfo that either returns a hardcoded version or None (or the value it returns could be specified by an argument passed to the constructor of MockPlatformInfo with a reasonable default value for this argument). Then we would implement IOSPort.determine_full_port_name() in terms of host.platform.iphoneSDKVersion().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1063824</commentid>
    <comment_count>4</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2015-01-23 17:06:26 -0800</bug_when>
    <thetext>Committed r179046: &lt;http://trac.webkit.org/changeset/179046&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1063862</commentid>
    <comment_count>5</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2015-01-23 19:51:17 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; Committed r179046: &lt;http://trac.webkit.org/changeset/179046&gt;

BTW, I added a FIXME comment as Dan suggested above.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>245194</attachid>
            <date>2015-01-22 19:19:10 -0800</date>
            <delta_ts>2022-02-28 04:13:05 -0800</delta_ts>
            <desc>Patch v1 (speculative fix)</desc>
            <filename>bug-140787-20150122191918.patch</filename>
            <type>text/plain</type>
            <size>1635</size>
            <attacher name="David Kilzer (:ddkilzer)">ddkilzer</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTc4ODY2CmRpZmYgLS1naXQgYS9Ub29scy9DaGFuZ2VMb2cg
Yi9Ub29scy9DaGFuZ2VMb2cKaW5kZXggN2IxZjJlNGMxNzNlODc3NmUyYzdiYmM4Y2FlOTUxM2M4
ZWFlNTE4NS4uYjFhOThkZDFlODM1NmMzMzA5MGY5YjVmNWMyYTUxZmUyYzM0YjFiZSAxMDA2NDQK
LS0tIGEvVG9vbHMvQ2hhbmdlTG9nCisrKyBiL1Rvb2xzL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE1
IEBACisyMDE1LTAxLTIyICBEYXZpZCBLaWx6ZXIgIDxkZGtpbHplckBhcHBsZS5jb20+CisKKyAg
ICAgICAgdGVzdC13ZWJraXRweTogd2Via2l0cHkudG9vbC5jb21tYW5kcy5lYXJseXdhcm5pbmdz
eXN0ZW1fdW5pdHRlc3QuRWFybHlXYXJuaW5nU3lzdGVtVGVzdC50ZXN0X2V3c2VzIGZhaWxzIG9u
IEVGTCwgR1RLLCBXaW4gcG9ydHMKKyAgICAgICAgPGh0dHA6Ly93ZWJraXQub3JnL2IvMTQwNzg3
PgorCisgICAgICA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HMucG9ydF9uYW1lOgogICAgICAgICAgICAgc2RrX3ZlcnNpb24gPSAnOC4wJwotICAgICAg
ICAgICAgaWYgaG9zdC5wbGF0Zm9ybS5pc19tYWMoKToKKyAgICAgICAgICAgIGlmIG9zLnBhdGgu
aXNmaWxlKCcvdXNyL2Jpbi94Y3J1bicpOgogICAgICAgICAgICAgICAgIHNka19jb21tYW5kX291
dHB1dCA9IHN1YnByb2Nlc3MuY2hlY2tfb3V0cHV0KFsnL3Vzci9iaW4veGNydW4nLCAnLS1zZGsn
LCAnaXBob25lb3MnLCAnLS1zaG93LXNkay12ZXJzaW9uJ10sIHN0ZGVycj1Ob25lKS5yc3RyaXAo
KQogICAgICAgICAgICAgICAgIGlmIHNka19jb21tYW5kX291dHB1dDoKICAgICAgICAgICAgICAg
ICAgICAgc2RrX3ZlcnNpb24gPSBzZGtfY29tbWFuZF9vdXRwdXQK
</data>
<flag name="review"
          id="270138"
          type_id="1"
          status="+"
          setter="dbates"
    />
          </attachment>
      

    </bug>

</bugzilla>