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

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

Issue 2016363003: Revert of Avoid nesting steps called under waiting for x: (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 6 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 | scripts/slave/recipe_modules/auto_bisect/example.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 config_validation 10 from . import config_validation
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 return True 737 return True
738 return False 738 return False
739 739
740 def wait_for_all(self, revision_list): 740 def wait_for_all(self, revision_list):
741 """Waits for all revisions in list to finish.""" 741 """Waits for all revisions in list to finish."""
742 for r in revision_list: 742 for r in revision_list:
743 self.wait_for(r) 743 self.wait_for(r)
744 744
745 def wait_for(self, revision): 745 def wait_for(self, revision):
746 """Waits for the revision to finish its job.""" 746 """Waits for the revision to finish its job."""
747 while True: 747 with self.api.m.step.nest('Waiting for ' + revision.revision_string()):
748 revision.update_status() 748 while True:
749 if revision.in_progress: 749 revision.update_status()
750 self.api.m.python.inline( 750 if revision.in_progress:
751 'sleeping', 751 self.api.m.python.inline(
752 """ 752 'sleeping',
753 import sys 753 """
754 import time 754 import sys
755 time.sleep(20*60) 755 import time
756 sys.exit(0) 756 time.sleep(20*60)
757 """) 757 sys.exit(0)
758 else: 758 """)
759 break 759 else:
760 break
760 761
761 def _update_candidate_range(self): 762 def _update_candidate_range(self):
762 """Updates lkgr and fkbr (last known good/first known bad) revisions. 763 """Updates lkgr and fkbr (last known good/first known bad) revisions.
763 764
764 lkgr and fkbr are 'pointers' to the appropriate RevisionState objects in 765 lkgr and fkbr are 'pointers' to the appropriate RevisionState objects in
765 bisectors.revisions.""" 766 bisectors.revisions."""
766 for r in self.revisions: 767 for r in self.revisions:
767 if r.tested: 768 if r.tested:
768 if r.good: 769 if r.good:
769 self.lkgr = r 770 self.lkgr = r
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 }) 940 })
940 return revision_rows 941 return revision_rows
941 942
942 def _get_build_url(self): 943 def _get_build_url(self):
943 properties = self.api.m.properties 944 properties = self.api.m.properties
944 bot_url = properties.get('buildbotURL', 945 bot_url = properties.get('buildbotURL',
945 'http://build.chromium.org/p/chromium/') 946 'http://build.chromium.org/p/chromium/')
946 builder_name = urllib.quote(properties.get('buildername', '')) 947 builder_name = urllib.quote(properties.get('buildername', ''))
947 builder_number = str(properties.get('buildnumber', '')) 948 builder_number = str(properties.get('buildnumber', ''))
948 return '%sbuilders/%s/builds/%s' % (bot_url, builder_name, builder_number) 949 return '%sbuilders/%s/builds/%s' % (bot_url, builder_name, builder_number)
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/auto_bisect/example.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698