Skip to content

Commit

Permalink
[wpt-importer] Always upload TestExpectations
Browse files Browse the repository at this point in the history
This speculatively fixes [0], where only TestExpectations should be
updated (e.g., only reftest failures), but PS2 with the new expectations
is not uploaded. In such a scenario, it's possible to arrive at the
check removed here with no working changes because TestExpectations are
committed earlier to satisfy `rebaseline-cl` [1].

This check is not necessary because uploading an empty PS1..2 in
response to one or more try build WPT failures should never be valid.
(Those try builders, if run, would just fail again.)

This issue may have been masked by the frequent changes staged by
`update-metadata`.

[0]: https://logs.chromium.org/logs/infra/buildbucket/cr-buildbucket/8765246270296581105/+/u/Import_changes_from_WPT_to_Chromium/stdout
[1]: crrev.com/c/3900005

Bug: None
Change-Id: Ic9cda8384876712af3e3d6cc7b7f67860ca0e19f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5008935
Reviewed-by: Weizhong Xia <weizhong@google.com>
Commit-Queue: Jonathan Lee <jonathanjlee@google.com>
Cr-Commit-Position: refs/heads/main@{#1220705}
  • Loading branch information
jonathan-j-lee authored and Chromium LUCI CQ committed Nov 7, 2023
1 parent 989719b commit 5ad6a86
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
21 changes: 10 additions & 11 deletions third_party/blink/tools/blinkpy/w3c/test_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,17 +245,16 @@ def update_expectations_for_cl(self) -> bool:

if try_results and self.git_cl.some_failed(try_results):
self.fetch_new_expectations_and_baselines()
if self.project_git.has_working_directory_changes():
# Skip slow and timeout tests so that presubmit check passes
port = self.host.port_factory.get()
if self.expectations_updater.skip_slow_timeout_tests(port):
path = port.path_to_generic_test_expectations_file()
self.project_git.add_list([path])

self._generate_manifest()
message = 'Update test expectations and baselines.'
self._commit_changes(message)
self._upload_patchset(message)
# Skip slow and timeout tests so that presubmit check passes
port = self.host.port_factory.get()
if self.expectations_updater.skip_slow_timeout_tests(port):
path = port.path_to_generic_test_expectations_file()
self.project_git.add_list([path])

self._generate_manifest()
message = 'Update test expectations and baselines.'
self._commit_changes(message)
self._upload_patchset(message)
return True

def _trigger_try_jobs(self):
Expand Down
3 changes: 3 additions & 0 deletions third_party/blink/tools/blinkpy/w3c/test_importer_unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ def test_update_expectations_for_cl_fail_but_no_changes(self):
'INFO: cq-builder-b\n',
'INFO: cq-wpt-builder-c\n',
'INFO: All jobs finished.\n',
'INFO: Skip Slow and Timeout tests.\n',
'INFO: Generating MANIFEST.json\n',
'INFO: Committing changes.\n',
])

def test_run_commit_queue_for_cl_pass(self):
Expand Down

0 comments on commit 5ad6a86

Please sign in to comment.