Bug 180132 - REGRESSION(r225199): [GTK][WPE] webkitpy.style.main_unittest is busted
Summary: REGRESSION(r225199): [GTK][WPE] webkitpy.style.main_unittest is busted
Status: RESOLVED DUPLICATE of bug 179534
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-29 01:18 PST by Ms2ger (he/him; ⌚ UTC+1/+2)
Modified: 2017-11-29 08:51 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ms2ger (he/him; ⌚ UTC+1/+2) 2017-11-29 01:18:02 PST
[1301/1677] webkitpy.style.main_unittest.ExpectationLinterInStyleCheckerTest.test_linter_duplicate_line erred:
  Traceback (most recent call last):
    File "/home/buildbot/wpe/wpe-linux-64-release-tests/build/Tools/Scripts/webkitpy/style/main_unittest.py", line 128, in test_linter_duplicate_line
      host = self._generate_testing_host(files)
    File "/home/buildbot/wpe/wpe-linux-64-release-tests/build/Tools/Scripts/webkitpy/style/main_unittest.py", line 104, in _generate_testing_host
      all_ports = [host.port_factory.get(name, options=options) for name in host.port_factory.all_port_names()]
    File "/home/buildbot/wpe/wpe-linux-64-release-tests/build/Tools/Scripts/webkitpy/port/factory.py", line 126, in get
      port_name = cls.determine_full_port_name(self._host, options, port_name)
    File "/home/buildbot/wpe/wpe-linux-64-release-tests/build/Tools/Scripts/webkitpy/port/apple.py", line 76, in determine_full_port_name
      port_name = cls.port_name + '-' + host.platform.os_version + '-wk2'
  TypeError: cannot concatenate 'str' and 'NoneType' objects

host.platform.os_version is None.
Comment 1 Michael Catanzaro 2017-11-29 08:00:37 PST
It's broken webkit-patch as well.
Comment 2 Jonathan Bedard 2017-11-29 08:02:47 PST

*** This bug has been marked as a duplicate of bug 179534 ***
Comment 3 Jonathan Bedard 2017-11-29 08:27:33 PST
What revision was this observed on?

Even when forcing os_version to None on Mac, I don't see this reproduce.  We shouldn't be hitting this codepath when checking style.  What is PortFactor.all_port_names() returning on GTK and WPE?  The mac ports returned by that function should always be of the form mac-<version>.
Comment 4 Michael Catanzaro 2017-11-29 08:38:24 PST
(In reply to Jonathan Bedard from comment #3)
> What revision was this observed on?

I'm on r225250 right now, and it prints every time I run 'webkit-patch upload'. Looks bad that we're going into apple.py at all.

> What is PortFactor.all_port_names() returning on GTK and WPE?

['gtk-wk2', 'ios-simulator', 'ios-simulator-wk2', 'mac-lion', 'mac-lion-wk2', 'mac-mavericks', 'mac-mavericks-wk2', 'mac-mountainlion', 'mac-mountainlion-wk2', 'mac-yosemite', 'mac-yosemite-wk2', 'win-7sp0', 'win-xp']
Comment 5 Jonathan Bedard 2017-11-29 08:51:41 PST
(In reply to Michael Catanzaro from comment #4)
> (In reply to Jonathan Bedard from comment #3)
> > What revision was this observed on?
> 
> I'm on r225250 right now, and it prints every time I run 'webkit-patch
> upload'. Looks bad that we're going into apple.py at all.
> 
> > What is PortFactor.all_port_names() returning on GTK and WPE?
> 
> ['gtk-wk2', 'ios-simulator', 'ios-simulator-wk2', 'mac-lion',
> 'mac-lion-wk2', 'mac-mavericks', 'mac-mavericks-wk2', 'mac-mountainlion',
> 'mac-mountainlion-wk2', 'mac-yosemite', 'mac-yosemite-wk2', 'win-7sp0',
> 'win-xp']

The reason you're going into apple.py is because we're instantiating versions of all port objects to lint test expectations.

Was just on IRC with Ms2ger, the problem seems to be with the 'ios-simulator' and 'ios-simulator-wk2' ports (because those ports don't contain version information in their names, unlike the mac ports).  The patch attached to bug 179534 should address the root cause of this.