Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(559)

Issue 1939843002: Replace webkitpy standalone builders functions with instantiable class. (Closed)

Created:
4 years, 7 months ago by bokan
Modified:
4 years, 7 months ago
Reviewers:
Dirk Pranke, qyearsley
CC:
qyearsley, blink-reviews, chromium-reviews, Dirk Pranke
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Replace webkitpy standalone builders functions with instantiable class. This patch replaces the standalone functions and global _exact_matches dictionary with an instantiable Builders class. By default, a new Builders object uses the dictionary that was previously globally defined so there should be no behavioral change. Subclasses of Builders can provide a new dictionary for tests. I've replaced uses of the global by instantiating a Builders object in the Host class and modifying BotTestExpectations and BotTestExpectationsFactory to take a Builders as an argument. This was suggested in https://codereview.chromium.org/1766583002/ and makes the builders more straightfoward to fake in unit tests. BUG=595414 Committed: https://crrev.com/2e290a5019d0e50540503c18f660cb44d117e0d6 Cr-Commit-Position: refs/heads/master@{#391805}

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 21

Patch Set 3 : Addressed feedback #

Patch Set 4 : Moved builders out of port, updated comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+362 lines, -460 lines) Patch
M third_party/WebKit/Tools/Scripts/webkitpy/common/host.py View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/common/host_mock.py View 1 2 3 2 chunks +5 lines, -2 lines 0 comments Download
A third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/builders.py View 1 2 3 1 chunk +101 lines, -0 lines 0 comments Download
A + third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/builders_unittest.py View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations.py View 1 2 3 4 chunks +8 lines, -5 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations_unittest.py View 1 2 3 4 chunks +17 lines, -24 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/builders.py View 1 2 3 1 chunk +0 lines, -97 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/builders_unittest.py View 1 2 3 1 chunk +0 lines, -43 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/factory.py View 1 2 2 chunks +2 lines, -4 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py View 3 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/flakytests.py View 1 2 2 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/flakytests_unittest.py View 1 2 3 3 chunks +21 lines, -16 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py View 1 2 3 5 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py View 1 2 3 30 chunks +189 lines, -253 lines 0 comments Download

Messages

Total messages: 17 (8 generated)
bokan
Hi Dirk, PTAL, you asked for something like this in https://codereview.chromium.org/1766583002/. Is this along the ...
4 years, 7 months ago (2016-05-02 17:18:08 UTC) #4
qyearsley
https://codereview.chromium.org/1939843002/diff/20001/third_party/WebKit/Tools/Scripts/webkitpy/common/host.py File third_party/WebKit/Tools/Scripts/webkitpy/common/host.py (right): https://codereview.chromium.org/1939843002/diff/20001/third_party/WebKit/Tools/Scripts/webkitpy/common/host.py#newcode64 third_party/WebKit/Tools/Scripts/webkitpy/common/host.py:64: self.builders = Builders() In general, does it make sense ...
4 years, 7 months ago (2016-05-02 21:56:36 UTC) #6
Dirk Pranke
Yup, this is pretty much what I had in mind. I would probably add some ...
4 years, 7 months ago (2016-05-03 23:16:38 UTC) #7
bokan
https://codereview.chromium.org/1939843002/diff/20001/third_party/WebKit/Tools/Scripts/webkitpy/common/host.py File third_party/WebKit/Tools/Scripts/webkitpy/common/host.py (right): https://codereview.chromium.org/1939843002/diff/20001/third_party/WebKit/Tools/Scripts/webkitpy/common/host.py#newcode64 third_party/WebKit/Tools/Scripts/webkitpy/common/host.py:64: self.builders = Builders() On 2016/05/02 21:56:36, qyearsley wrote: > ...
4 years, 7 months ago (2016-05-04 11:58:47 UTC) #8
Dirk Pranke
lgtm. I've described the classes below, so you could update the comments if so desired. ...
4 years, 7 months ago (2016-05-04 22:42:36 UTC) #9
bokan
https://codereview.chromium.org/1939843002/diff/20001/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/builders.py File third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/builders.py (right): https://codereview.chromium.org/1939843002/diff/20001/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/builders.py#newcode72 third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/builders.py:72: def rebaseline_override_dir(self, builder_name): On 2016/05/04 22:42:36, Dirk Pranke wrote: ...
4 years, 7 months ago (2016-05-05 14:20:54 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1939843002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1939843002/60001
4 years, 7 months ago (2016-05-05 14:21:21 UTC) #13
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 7 months ago (2016-05-05 15:25:59 UTC) #15
commit-bot: I haz the power
4 years, 7 months ago (2016-05-05 15:27:30 UTC) #17
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/2e290a5019d0e50540503c18f660cb44d117e0d6
Cr-Commit-Position: refs/heads/master@{#391805}

Powered by Google App Engine
This is Rietveld 408576698