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

Side by Side Diff: scripts/slave/recipe_modules/auto_bisect/bisector.py

Issue 1758603004: Checking for failure in requested builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 import json 5 import json
6 import re 6 import re
7 import time 7 import time
8 import urllib 8 import urllib
9 9
10 from . import depot_config 10 from . import depot_config
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 self.culprit = revision.next_revision 647 self.culprit = revision.next_revision
648 return True 648 return True
649 return False 649 return False
650 650
651 def wait_for_all(self, revision_list): 651 def wait_for_all(self, revision_list):
652 """Waits for all revisions in list to finish.""" 652 """Waits for all revisions in list to finish."""
653 for r in revision_list: 653 for r in revision_list:
654 self.wait_for(r) 654 self.wait_for(r)
655 655
656 def wait_for(self, revision): 656 def wait_for(self, revision):
657 """Waits for any of the revisions in the list to finish its job(s).""" 657 """Waits for the revision to finish its job."""
658 with self.api.m.step.nest('Waiting for ' + revision.revision_string()): 658 with self.api.m.step.nest('Waiting for ' + revision.revision_string()):
659 start_time = time.time()
660 while True: 659 while True:
661 revision.update_status() 660 revision.update_status()
662 if revision.in_progress: 661 if revision.in_progress:
663 self.api.m.python.inline( 662 self.api.m.python.inline(
664 'sleeping', 663 'sleeping',
665 """ 664 """
666 import sys 665 import sys
667 import time 666 import time
668 time.sleep(300) 667 time.sleep(20*60)
669 sys.exit(0) 668 sys.exit(0)
670 """) 669 """)
671 elapsed_time = time.time() - start_time
672 if elapsed_time > 3 * 60 * 60: # pragma: no cover
673 # Timed out waiting for build
674 revision.status = revision.FAILED
675 else: 670 else:
676 break 671 break
677 672
678 def _update_candidate_range(self): 673 def _update_candidate_range(self):
679 """Updates lkgr and fkbr (last known good/first known bad) revisions. 674 """Updates lkgr and fkbr (last known good/first known bad) revisions.
680 675
681 lkgr and fkbr are 'pointers' to the appropriate RevisionState objects in 676 lkgr and fkbr are 'pointers' to the appropriate RevisionState objects in
682 bisectors.revisions.""" 677 bisectors.revisions."""
683 for r in self.revisions: 678 for r in self.revisions:
684 if r.tested: 679 if r.tested:
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 }) 848 })
854 return revision_rows 849 return revision_rows
855 850
856 def _get_build_url(self): 851 def _get_build_url(self):
857 properties = self.api.m.properties 852 properties = self.api.m.properties
858 bot_url = properties.get('buildbotURL', 853 bot_url = properties.get('buildbotURL',
859 'http://build.chromium.org/p/chromium/') 854 'http://build.chromium.org/p/chromium/')
860 builder_name = urllib.quote(properties.get('buildername', '')) 855 builder_name = urllib.quote(properties.get('buildername', ''))
861 builder_number = str(properties.get('buildnumber', '')) 856 builder_number = str(properties.get('buildnumber', ''))
862 return '%sbuilders/%s/builds/%s' % (bot_url, builder_name, builder_number) 857 return '%sbuilders/%s/builds/%s' % (bot_url, builder_name, builder_number)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698