|
|
Chromium Code Reviews|
Created:
3 years, 8 months ago by Gleb Lanbin Modified:
3 years, 8 months ago Reviewers:
qyearsley CC:
blink-reviews, chromium-reviews, jeffcarp Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionMake run-webkit-tests work with virtual parent LayoutTest directories
This patch makes possible to run multiple test suites with the same
prefix.
BUG=707973
Review-Url: https://codereview.chromium.org/2795793003
Cr-Commit-Position: refs/heads/master@{#463114}
Committed: https://chromium.googlesource.com/chromium/src/+/22a541ff6954534ba227c393e329938cbac2253a
Patch Set 1 #Patch Set 2 : update TOTAL_TESTS #
Total comments: 6
Patch Set 3 : fix comments #Patch Set 4 : fix test for win_chromium_rel_ng #
Messages
Total messages: 52 (43 generated)
Description was changed from ========== Make run-webkit-tests work with virtual parent LayoutTest directories BUG=707973 ========== to ========== Make run-webkit-tests work with virtual parent LayoutTest directories This patch makes possible to run multiple test suites with the same prefix. BUG=707973 ==========
glebl@chromium.org changed reviewers: + dpranke@chromium.org, qyearsley@chromium.org
The CQ bit was checked by glebl@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: 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_...)
I'll defer this one to qyearsley@.
The CQ bit was checked by glebl@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by glebl@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Thanks for doing this, I definitely agree that this will make it easier to run groups of virtual tests. I have a nitpicky concern about the behavior of Ports.tests when given a path that's contains the start of a directory name but not the whole directory path, and wanted to know what you think. https://codereview.chromium.org/2795793003/diff/20001/third_party/WebKit/Tool... File third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py (right): https://codereview.chromium.org/2795793003/diff/20001/third_party/WebKit/Tool... third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py:1509: if any(p.startswith(suite.name) for p in paths) or any(suite.name.startswith(p) for p in paths): This is a bit difficult to think about without thinking of examples, for me... So, suppose suites = [ VirtualTestSuite(prefix='layout_ng', base='fast/block/basic', args=['----enable-blink-features=LayoutNG']), VirtualTestSuite(prefix='layout_ng', base='fast/block/margin-collapse', args=['----enable-blink-features=LayoutNG']), ] and paths = ['virtual/layout_ng/fast'] The the names of the suites are virtual/layout_ng/fast/block/basic, and virtual/layout_ng/fast/block/margin-collapse then any(p.startswith(suite.name) for p in paths) is False because both of the suite names are longer than the given path, but any(suite.name.startswith(p) for p in paths) is True because both of the suite names start with the given path. So, this seems correct. :-) https://codereview.chromium.org/2795793003/diff/20001/third_party/WebKit/Tool... third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py:1513: tests.append(test) I *think* that we might want to change this bit as well (see comment below in tests) if any(test == p or test.startswith(p + '/') or test.startswith(p) and p.endswith('/')) for p in paths) Although that makes it more complex and uglier. What do you think? https://codereview.chromium.org/2795793003/diff/20001/third_party/WebKit/Tool... File third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py (right): https://codereview.chromium.org/2795793003/diff/20001/third_party/WebKit/Tool... third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py:452: self.assertIn('virtual/virtual_passes/passes_two/test-virtual-passes.html', tests) I think that this behavior is subtly inconsistent with the way that Port.tests works for "real tests"... if the input paths do not have a "*", then the last part of the path can't normally be just part of a directory name. For example, right now there are the directories "fast/inline" and "fast/inline-block". But if I run `run-webkit-tests fast/inline`, then only those in "fast/inline" are run, and not those in "fast/inline-block". So I think to test the desired behavior, we might want to do: tests = port.tests(['virtual/virtual_passes']) self.assertIn('virtual/virtual_passes/passes/test-virtual-passes.html', tests) self.assertIn('virtual/virtual_passes/passes_two/test-virtual-passes.html', tests) and/or we might want to add the extra test as tests.add('passes/two/test-virtual-passes.html') and then: tests = port.tests(['virtual/virtual_passes/passes']) self.assertIn('virtual/virtual_passes/passes/test-virtual-passes.html', tests) self.assertIn('virtual/virtual_passes/passes/two/test-virtual-passes.html', tests) Does that make sense?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
glebl@chromium.org changed reviewers: - dpranke@chromium.org
thanks, PTAL https://codereview.chromium.org/2795793003/diff/20001/third_party/WebKit/Tool... File third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py (right): https://codereview.chromium.org/2795793003/diff/20001/third_party/WebKit/Tool... third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py:1509: if any(p.startswith(suite.name) for p in paths) or any(suite.name.startswith(p) for p in paths): On 2017/04/05 22:47:07, qyearsley wrote: > This is a bit difficult to think about without thinking of examples, for me... > > So, suppose suites = [ > VirtualTestSuite(prefix='layout_ng', base='fast/block/basic', > args=['----enable-blink-features=LayoutNG']), > VirtualTestSuite(prefix='layout_ng', base='fast/block/margin-collapse', > args=['----enable-blink-features=LayoutNG']), > ] and paths = ['virtual/layout_ng/fast'] > > The the names of the suites are > > virtual/layout_ng/fast/block/basic, and > virtual/layout_ng/fast/block/margin-collapse > > then any(p.startswith(suite.name) for p in paths) is False because both of the > suite names are longer than the given path, but any(suite.name.startswith(p) for > p in paths) is True because both of the suite names start with the given path. > > So, this seems correct. :-) Acknowledged. https://codereview.chromium.org/2795793003/diff/20001/third_party/WebKit/Tool... third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py:1513: tests.append(test) On 2017/04/05 22:47:07, qyearsley wrote: > I *think* that we might want to change this bit as well (see comment below in > tests) > > if any(test == p or > test.startswith(p + '/') or > test.startswith(p) and p.endswith('/')) for p in paths) > > Although that makes it more complex and uglier. > > What do you think? Done. https://codereview.chromium.org/2795793003/diff/20001/third_party/WebKit/Tool... File third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py (right): https://codereview.chromium.org/2795793003/diff/20001/third_party/WebKit/Tool... third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py:452: self.assertIn('virtual/virtual_passes/passes_two/test-virtual-passes.html', tests) On 2017/04/05 22:47:07, qyearsley wrote: > I think that this behavior is subtly inconsistent with the way that Port.tests > works for "real tests"... if the input paths do not have a "*", then the last > part of the path can't normally be just part of a directory name. > > For example, right now there are the directories "fast/inline" and > "fast/inline-block". But if I run `run-webkit-tests fast/inline`, then only > those in "fast/inline" are run, and not those in "fast/inline-block". > > So I think to test the desired behavior, we might want to do: > > tests = port.tests(['virtual/virtual_passes']) > self.assertIn('virtual/virtual_passes/passes/test-virtual-passes.html', > tests) > self.assertIn('virtual/virtual_passes/passes_two/test-virtual-passes.html', > tests) > > and/or we might want to add the extra test as > tests.add('passes/two/test-virtual-passes.html') and then: > > tests = port.tests(['virtual/virtual_passes/passes']) > self.assertIn('virtual/virtual_passes/passes/test-virtual-passes.html', > tests) > self.assertIn('virtual/virtual_passes/passes/two/test-virtual-passes.html', > tests) > > Does that make sense? Done.
The CQ bit was checked by glebl@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
LGTM, thanks
The CQ bit was unchecked by glebl@chromium.org
The CQ bit was checked by glebl@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by glebl@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by glebl@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by glebl@chromium.org
The CQ bit was checked by glebl@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by glebl@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by glebl@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by glebl@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from qyearsley@chromium.org Link to the patchset: https://codereview.chromium.org/2795793003/#ps60001 (title: "fix test for win_chromium_rel_ng")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 60001, "attempt_start_ts": 1491619992777310,
"parent_rev": "6ff361f672aceea93e56d10189c7a2f150dcf415", "commit_rev":
"22a541ff6954534ba227c393e329938cbac2253a"}
Message was sent while issue was closed.
Description was changed from ========== Make run-webkit-tests work with virtual parent LayoutTest directories This patch makes possible to run multiple test suites with the same prefix. BUG=707973 ========== to ========== Make run-webkit-tests work with virtual parent LayoutTest directories This patch makes possible to run multiple test suites with the same prefix. BUG=707973 Review-Url: https://codereview.chromium.org/2795793003 Cr-Commit-Position: refs/heads/master@{#463114} Committed: https://chromium.googlesource.com/chromium/src/+/22a541ff6954534ba227c393e329... ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/22a541ff6954534ba227c393e329... |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
