in mozregression/bisector.py [0:0]
def ensure_good_and_bad(self):
good, bad = self.build_range[0], self.build_range[-1]
if self.handler.find_fix:
good, bad = bad, good
LOG.info("Testing good and bad builds to ensure that they are" " really good and bad...")
self.download_manager.focus_download(good)
if self.dl_in_background:
self.download_manager.download_in_background(bad)
def _evaluate(build_info, expected):
while 1:
res = self.test_runner.evaluate(build_info)
if res == expected[0]:
return True
elif res == "s":
LOG.info("You can not skip this build.")
elif res == "e":
return
elif res == "r":
pass
else:
raise GoodBadExpectationError(
"Build was expected to be %s! The initial good/bad"
" range seems incorrect." % expected
)
if _evaluate(good, "good"):
self.download_manager.focus_download(bad)
if self.dl_in_background:
# download next build (mid) in background
self.download_manager.download_in_background(
self.build_range[self.build_range.mid_point()]
)
return _evaluate(bad, "bad")