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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py

Issue 2696263004: WPT importer: Log CL status and consider "lgtm" success. (Closed)
Patch Set: Rebased Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Fetches a copy of the latest state of a W3C test repository and commits. 5 """Fetches a copy of the latest state of a W3C test repository and commits.
6 6
7 If this script is given the argument --auto-update, it will also: 7 If this script is given the argument --auto-update, it will also:
8 1. Upload a CL. 8 1. Upload a CL.
9 2. Trigger try jobs and wait for them to complete. 9 2. Trigger try jobs and wait for them to complete.
10 3. Make any changes that are required for new failing tests. 10 3. Make any changes that are required for new failing tests.
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 self.git_cl.run(['set-commit', '--rietveld']) 347 self.git_cl.run(['set-commit', '--rietveld'])
348 try_results = self.git_cl.wait_for_try_jobs( 348 try_results = self.git_cl.wait_for_try_jobs(
349 poll_delay_seconds=POLL_DELAY_SECONDS, timeout_seconds=TIMEOUT_SECON DS) 349 poll_delay_seconds=POLL_DELAY_SECONDS, timeout_seconds=TIMEOUT_SECON DS)
350 350
351 if not try_results: 351 if not try_results:
352 _log.error('No try job results.') 352 _log.error('No try job results.')
353 self.git_cl.run(['set-close']) 353 self.git_cl.run(['set-close'])
354 return False 354 return False
355 355
356 # If the CQ passes, then the issue will be closed. 356 # If the CQ passes, then the issue will be closed.
357 if not self.git_cl.is_closed(): 357 status = self.git_cl.run(['status' '--field', 'status']).strip()
358 _log.info('CL status: "%s"', status)
359 if status not in ('lgtm', 'closed'):
358 _log.error('CQ appears to have failed; aborting.') 360 _log.error('CQ appears to have failed; aborting.')
359 self.git_cl.run(['set-close']) 361 self.git_cl.run(['set-close'])
360 return False 362 return False
361 363
362 _log.info('Update completed.') 364 _log.info('Update completed.')
363 return True 365 return True
364 366
365 def _upload_cl(self): 367 def _upload_cl(self):
366 _log.info('Uploading change list.') 368 _log.info('Uploading change list.')
367 directory_owners = self.get_directory_owners() 369 directory_owners = self.get_directory_owners()
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 """Returns a dict mapping source to dest name for layout tests that have been renamed.""" 460 """Returns a dict mapping source to dest name for layout tests that have been renamed."""
459 out = self.check_run(['git', 'diff', 'origin/master', '-M100%', '--diff- filter=R', '--name-status']) 461 out = self.check_run(['git', 'diff', 'origin/master', '-M100%', '--diff- filter=R', '--name-status'])
460 renamed_tests = {} 462 renamed_tests = {}
461 for line in out.splitlines(): 463 for line in out.splitlines():
462 _, source_path, dest_path = line.split() 464 _, source_path, dest_path = line.split()
463 source_test = self.finder.layout_test_name(source_path) 465 source_test = self.finder.layout_test_name(source_path)
464 dest_test = self.finder.layout_test_name(dest_path) 466 dest_test = self.finder.layout_test_name(dest_path)
465 if source_test and dest_test: 467 if source_test and dest_test:
466 renamed_tests[source_test] = dest_test 468 renamed_tests[source_test] = dest_test
467 return renamed_tests 469 return renamed_tests
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698