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

Issue 2136723002: Create test expectations line automatically from failing test results (Closed)

Created:
4 years, 5 months ago by dcampb
Modified:
4 years, 4 months ago
CC:
blink-reviews, blink-reviews-w3ctests_chromium.org, cbentzel+watch_chromium.org, chromium-reviews, jsbell
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Create Test Expectation lines automatically from failing test results. BUG=625254 Committed: https://crrev.com/22c2cad13b358a133ae399532ce910c1ebb96073 Cr-Commit-Position: refs/heads/master@{#406868}

Patch Set 1 #

Patch Set 2 : Remove Layouttestresults.py from patch #

Total comments: 37

Patch Set 3 : Create list of test expectations lines from failing test tree #

Total comments: 13

Patch Set 4 : adds unittests and implements a class in update_w3c_test_expectations #

Patch Set 5 : Add function to write to TestExpectations with unittest #

Total comments: 14

Patch Set 6 : Refactored script to pass in Host object to main use its attributes #

Total comments: 5

Patch Set 7 : Modified doc strings for functions. #

Total comments: 21

Patch Set 8 : Formatting changes and unittest updates #

Total comments: 23

Patch Set 9 : Refactored unittests #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+382 lines, -0 lines) Patch
A third_party/WebKit/Tools/Scripts/update-w3c-test-expections View 1 2 3 4 5 6 1 chunk +18 lines, -0 lines 4 comments Download
A third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py View 1 2 3 4 5 6 7 8 1 chunk +257 lines, -0 lines 8 comments Download
A third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations_unittest.py View 1 2 3 4 5 6 7 8 1 chunk +107 lines, -0 lines 0 comments Download

Messages

Total messages: 48 (16 generated)
dcampb
These files are a work in progress. Looking for feedback and code optimizations. Thanks!
4 years, 5 months ago (2016-07-11 16:23:18 UTC) #2
raikiri
https://codereview.chromium.org/2136723002/diff/20001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py File third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py (right): https://codereview.chromium.org/2136723002/diff/20001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py#newcode19 third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py:19: webo = Web() maybe rename webo to something a ...
4 years, 5 months ago (2016-07-11 18:46:55 UTC) #3
qyearsley
Apart from the initial comments below, there are two other things to work on: 1. ...
4 years, 5 months ago (2016-07-11 23:17:33 UTC) #4
dcampb
https://codereview.chromium.org/2136723002/diff/20001/third_party/WebKit/Tools/Scripts/update-w3c-test-expectations File third_party/WebKit/Tools/Scripts/update-w3c-test-expectations (right): https://codereview.chromium.org/2136723002/diff/20001/third_party/WebKit/Tools/Scripts/update-w3c-test-expectations#newcode28 third_party/WebKit/Tools/Scripts/update-w3c-test-expectations:28: # OF THIS SOFTWARE, EVEN IF ADVISED OF THE ...
4 years, 5 months ago (2016-07-12 03:55:56 UTC) #5
qyearsley
https://codereview.chromium.org/2136723002/diff/20001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py File third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py (right): https://codereview.chromium.org/2136723002/diff/20001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py#newcode7 third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py:7: from webkitpy.common.checkout.scm.git import Git On 2016/07/12 at 03:55:55, dcampb ...
4 years, 5 months ago (2016-07-12 16:43:35 UTC) #6
dcampb
https://codereview.chromium.org/2136723002/diff/20001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py File third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py (right): https://codereview.chromium.org/2136723002/diff/20001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py#newcode19 third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py:19: webo = Web() On 2016/07/12 at 03:55:55, dcampb wrote: ...
4 years, 5 months ago (2016-07-12 19:57:03 UTC) #8
qyearsley
https://codereview.chromium.org/2136723002/diff/40001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py File third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py (right): https://codereview.chromium.org/2136723002/diff/40001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py#newcode1 third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py:1: # Coppyright 2016 The Chromium Authors. All rights reserved. ...
4 years, 5 months ago (2016-07-12 23:00:15 UTC) #9
dcampb
https://codereview.chromium.org/2136723002/diff/20001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py File third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py (right): https://codereview.chromium.org/2136723002/diff/20001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py#newcode39 third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py:39: platform = builder_name[:builder_name.find("_")] On 2016/07/11 at 23:17:33, qyearsley wrote: ...
4 years, 5 months ago (2016-07-15 00:24:14 UTC) #11
qyearsley
https://codereview.chromium.org/2136723002/diff/40001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations_unittest.py File third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations_unittest.py (right): https://codereview.chromium.org/2136723002/diff/40001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations_unittest.py#newcode1 third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations_unittest.py:1: from webkitpy.w3c.update_w3c_test_expectations import * On 2016/07/15 at 00:24:13, dcampb ...
4 years, 5 months ago (2016-07-15 16:42:47 UTC) #12
dcampb
4 years, 5 months ago (2016-07-16 04:31:06 UTC) #14
qyearsley
A few quick formatting comments: https://codereview.chromium.org/2136723002/diff/100001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py File third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py (right): https://codereview.chromium.org/2136723002/diff/100001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py#newcode23 third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py:23: from webkitpy.common.config.builders import BUILDERS ...
4 years, 5 months ago (2016-07-18 18:31:42 UTC) #15
dcampb
https://codereview.chromium.org/2136723002/diff/100001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py File third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py (right): https://codereview.chromium.org/2136723002/diff/100001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py#newcode23 third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py:23: from webkitpy.common.config.builders import BUILDERS as Builders_list_dict On 2016/07/18 at ...
4 years, 5 months ago (2016-07-18 20:50:04 UTC) #18
dcampb
Last patch had a modified file that shouldn't have been there. I deleted it and ...
4 years, 5 months ago (2016-07-18 20:53:10 UTC) #21
qyearsley
Note about docstring style: Blink officially uses the PEP8 style, which says to follow PEP257 ...
4 years, 5 months ago (2016-07-18 22:55:29 UTC) #22
dcampb
hopefully this is the last patch =D
4 years, 5 months ago (2016-07-19 05:37:01 UTC) #23
qyearsley
Still mostly formatting nits. I'm fairly nit-picky about formatting :-P https://codereview.chromium.org/2136723002/diff/180001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py File third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py (right): https://codereview.chromium.org/2136723002/diff/180001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py#newcode33 ...
4 years, 5 months ago (2016-07-19 17:59:48 UTC) #25
dcampb
https://codereview.chromium.org/2136723002/diff/180001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py File third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py (right): https://codereview.chromium.org/2136723002/diff/180001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py#newcode165 third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py:165: dictionary: A dictionary with the format { On 2016/07/19 ...
4 years, 5 months ago (2016-07-20 03:29:43 UTC) #26
qyearsley
https://codereview.chromium.org/2136723002/diff/200001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py File third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py (right): https://codereview.chromium.org/2136723002/diff/200001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py#newcode49 third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py:49: return self._host._scm.get_issue_number() This line is accessing a private attribute ...
4 years, 5 months ago (2016-07-20 16:55:28 UTC) #28
dcampb
https://codereview.chromium.org/2136723002/diff/200001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py File third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py (right): https://codereview.chromium.org/2136723002/diff/200001/third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py#newcode49 third_party/WebKit/Tools/Scripts/webkitpy/w3c/update_w3c_test_expectations.py:49: return self._host._scm.get_issue_number() On 2016/07/20 at 16:55:28, qyearsley wrote: > ...
4 years, 5 months ago (2016-07-20 21:11:59 UTC) #29
qyearsley
LGTM - Joshua or Dirk, if you have time to review this CL, could you ...
4 years, 5 months ago (2016-07-20 21:21:45 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2136723002/220001
4 years, 5 months ago (2016-07-21 00:13:20 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/266266)
4 years, 5 months ago (2016-07-21 03:27:35 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2136723002/220001
4 years, 5 months ago (2016-07-21 05:25:17 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/266426)
4 years, 5 months ago (2016-07-21 07:33:41 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2136723002/220001
4 years, 5 months ago (2016-07-21 15:17:04 UTC) #40
commit-bot: I haz the power
Committed patchset #9 (id:220001)
4 years, 5 months ago (2016-07-21 16:16:56 UTC) #41
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/22c2cad13b358a133ae399532ce910c1ebb96073 Cr-Commit-Position: refs/heads/master@{#406868}
4 years, 5 months ago (2016-07-21 16:20:05 UTC) #43
Dirk Pranke
A few very-belated comments, but this basically looks fine. https://codereview.chromium.org/2136723002/diff/220001/third_party/WebKit/Tools/Scripts/update-w3c-test-expections File third_party/WebKit/Tools/Scripts/update-w3c-test-expections (right): https://codereview.chromium.org/2136723002/diff/220001/third_party/WebKit/Tools/Scripts/update-w3c-test-expections#newcode18 third_party/WebKit/Tools/Scripts/update-w3c-test-expections:18: ...
4 years, 4 months ago (2016-08-09 03:59:39 UTC) #44
dcampb
https://codereview.chromium.org/2136723002/diff/220001/third_party/WebKit/Tools/Scripts/update-w3c-test-expections File third_party/WebKit/Tools/Scripts/update-w3c-test-expections (right): https://codereview.chromium.org/2136723002/diff/220001/third_party/WebKit/Tools/Scripts/update-w3c-test-expections#newcode18 third_party/WebKit/Tools/Scripts/update-w3c-test-expections:18: sys.exit(return_code) On 2016/08/09 at 03:59:39, Dirk Pranke wrote: > ...
4 years, 4 months ago (2016-08-09 18:10:45 UTC) #45
Dirk Pranke
https://codereview.chromium.org/2136723002/diff/220001/third_party/WebKit/Tools/Scripts/update-w3c-test-expections File third_party/WebKit/Tools/Scripts/update-w3c-test-expections (right): https://codereview.chromium.org/2136723002/diff/220001/third_party/WebKit/Tools/Scripts/update-w3c-test-expections#newcode18 third_party/WebKit/Tools/Scripts/update-w3c-test-expections:18: sys.exit(return_code) On 2016/08/09 18:10:44, dcampb wrote: > On 2016/08/09 ...
4 years, 4 months ago (2016-08-09 18:35:05 UTC) #46
dcampb
https://codereview.chromium.org/2136723002/diff/220001/third_party/WebKit/Tools/Scripts/update-w3c-test-expections File third_party/WebKit/Tools/Scripts/update-w3c-test-expections (right): https://codereview.chromium.org/2136723002/diff/220001/third_party/WebKit/Tools/Scripts/update-w3c-test-expections#newcode18 third_party/WebKit/Tools/Scripts/update-w3c-test-expections:18: sys.exit(return_code) On 2016/08/09 at 18:35:04, Dirk Pranke wrote: > ...
4 years, 4 months ago (2016-08-09 18:49:51 UTC) #47
Dirk Pranke
4 years, 4 months ago (2016-08-09 19:20:24 UTC) #48
Message was sent while issue was closed.
On 2016/08/09 18:49:51, dcampb wrote:
>
https://codereview.chromium.org/2136723002/diff/220001/third_party/WebKit/Too...
> File third_party/WebKit/Tools/Scripts/update-w3c-test-expections (right):
> 
>
https://codereview.chromium.org/2136723002/diff/220001/third_party/WebKit/Too...
> third_party/WebKit/Tools/Scripts/update-w3c-test-expections:18:
> sys.exit(return_code)
> On 2016/08/09 at 18:35:04, Dirk Pranke wrote:
> > On 2016/08/09 18:10:44, dcampb wrote:
> > > On 2016/08/09 at 03:59:39, Dirk Pranke wrote:
> > > > this line probably should've been combined with line 16:
> > > > 
> > > >   sys.exit(main(host, port))
> > > > 
> > > > as it is, if this file was somehow eval'ed directly, it wouldn't work
> right
> > > and would always call sys.exit(), but with an uninitialized variable.
> > > 
> > > What do you mean by eval'ed directly?? I'm a little confused.
> > 
> > Good question, I wasn't super clear here ... I'm talking about what Python
> does when a file is loaded.
> > 
> > If, for example, this file was a python module that got imported, and not a
> top-level script, then
> > 
> > if you were to run `python update_w3c_test_expectations.py`, __name__ would
be
> set to "__main__"
> > and the block on lines 12-16 would execute, as would line 18, so things
would
> be fine.
> > 
> > However, if you were to run another python file that had `import
> update_w3_test_expectations`,
> > __name__ would *not* be set to "__main__", so that block wouldn't execute,
but
> line 18 would 
> > still execute. Which would be even worse, since that would cause python to
> quit (both because
> > of the uninitialized variable and because you're calling sys.exit()).
> > 
> > Of course, this isn't a module, it's a top-level script. So, you can't
import
> it, and don't have that
> > problem, but you could still call execfile("update-w3-test-expectations")
and
> the same thing would
> > happen. Though it's not real likely that anyone's going to do this, either.
So
> this isn't a bug that's
> > likely to actually show up.
> > 
> > This is a long winded-way of saying be careful what you have as unindented
> python code in
> > scripts, because it'll always execute, and be careful about what you have in

> > `if __name__ == "__main__"` blocks :).
> 
> So should I unindent the block and remove the 'if __name__ == "__main__"'
line??
> and add sys.exit(main(host, port))? 
> I reckon this would run no matter what calls it?

Either that or remove line 18 and change line 16. I'd probably do the latter, as
I
tend to avoid having code that executes at the top level, even in scripts that
are meant to be invoked directly, because too often you end up needing to
move such things into modules so you can test them or reuse them, and then
you have to re-indent everything :).

Powered by Google App Engine
This is Rietveld 408576698