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

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

Issue 2827823002: wpt-importer: Don't run git cl set-close when there are no try job results. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | 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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 self.fetch_new_expectations_and_baselines() 354 self.fetch_new_expectations_and_baselines()
355 message = 'Update test expectations and baselines.' 355 message = 'Update test expectations and baselines.'
356 self.check_run(['git', 'commit', '-a', '-m', message]) 356 self.check_run(['git', 'commit', '-a', '-m', message])
357 self._upload_patchset(message) 357 self._upload_patchset(message)
358 358
359 # Trigger CQ and wait for CQ try jobs to finish. 359 # Trigger CQ and wait for CQ try jobs to finish.
360 self.git_cl.run(['set-commit', '--gerrit']) 360 self.git_cl.run(['set-commit', '--gerrit'])
361 try_results = self.git_cl.wait_for_try_jobs( 361 try_results = self.git_cl.wait_for_try_jobs(
362 poll_delay_seconds=POLL_DELAY_SECONDS, timeout_seconds=TIMEOUT_SECON DS) 362 poll_delay_seconds=POLL_DELAY_SECONDS, timeout_seconds=TIMEOUT_SECON DS)
363 363
364 if not try_results: 364 _log.info('Try results: %s', try_results)
365 _log.error('No try job results.')
366 self.git_cl.run(['set-close'])
367 return False
368 365
369 # If the CQ passes, then the issue will be closed. 366 # If the CQ passed, then the issue will be closed already.
370 status = self.git_cl.run(['status' '--field', 'status']).strip() 367 status = self.git_cl.run(['status' '--field', 'status']).strip()
371 _log.info('CL status: "%s"', status) 368 _log.info('CL status: "%s"', status)
372 if status not in ('lgtm', 'closed'): 369 if status not in ('lgtm', 'closed'):
373 _log.error('CQ appears to have failed; aborting.') 370 _log.error('CQ appears to have failed; aborting.')
374 self.git_cl.run(['set-close']) 371 self.git_cl.run(['set-close'])
375 return False 372 return False
376 373
377 _log.info('Update completed.') 374 _log.info('Update completed.')
378 return True 375 return True
379 376
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 """Returns a dict mapping source to dest name for layout tests that have been renamed.""" 482 """Returns a dict mapping source to dest name for layout tests that have been renamed."""
486 out = self.check_run(['git', 'diff', 'origin/master', '-M100%', '--diff- filter=R', '--name-status']) 483 out = self.check_run(['git', 'diff', 'origin/master', '-M100%', '--diff- filter=R', '--name-status'])
487 renamed_tests = {} 484 renamed_tests = {}
488 for line in out.splitlines(): 485 for line in out.splitlines():
489 _, source_path, dest_path = line.split() 486 _, source_path, dest_path = line.split()
490 source_test = self.finder.layout_test_name(source_path) 487 source_test = self.finder.layout_test_name(source_path)
491 dest_test = self.finder.layout_test_name(dest_path) 488 dest_test = self.finder.layout_test_name(dest_path)
492 if source_test and dest_test: 489 if source_test and dest_test:
493 renamed_tests[source_test] = dest_test 490 renamed_tests[source_test] = dest_test
494 return renamed_tests 491 return renamed_tests
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698