def bisector(self): if self._bisector is None: self._bisector = Bisector( self.fetch_config, self.test_runner, self.build_download_manager, dl_in_background=self.options.background_dl) return self._bisector
def setUp(self): self.handler = MagicMock(find_fix=False, ensure_good_and_bad=False) self.test_runner = Mock() self.bisector = Bisector(Mock(), self.test_runner, Mock(), dl_in_background=False) self.bisector.download_background = False
def __init__(self, good, bad, platform, warning, warning_limit, warning_re, ignore_lines, required_test): init_logger() self.use_nightly = True try: self.good = parse_date(good) self.bad = parse_date(bad) except DateFormatError: # This hopefully a revision range. We can bypass nightly and # go directly to InboundHandler. That itself is a bit of a misnomer, # it will still bisect m-c builds, but by changeset range, not date # range. self.use_nightly = False self.good = good self.bad = bad self.ignore_lines = ignore_lines self.test_runner = WarningTestRunner(warning, platform, ignore_lines=ignore_lines, warning_re=warning_re, warning_limit=warning_limit, required_test=required_test) # Convert the platform to a mozregression friendly version. # Also avoid overwriting the os module by *not* using |os| for a # variable name. (_os, bits) = re.match(r'([a-zA-Z]+)-?([0-9]+)?', platform).groups() if not bits or bits not in (32, 64): bits = 32 # windows7-32 # windows7-32-vm # win32 # win64 if '64' in platform: bits = 64 if _os.startswith('win'): _os = 'win' print("_os = %s bits = %s" % (_os, bits)) # TODO(ER): We might be able to ditch this. self.fetch_config = create_config('firefox', _os, int(bits)) # Hardcode to m-c for now. self.fetch_config.set_repo('mozilla-central') self.fetch_config.set_build_type('debug') class FakeDownloadManager: def focus_download(self, foo): pass dm = FakeDownloadManager() self.bisector = Bisector(self.fetch_config, self.test_runner, dm, False, None)
def setUp(self): self.handler = MagicMock(find_fix=False, ensure_good_and_bad=False) self.test_runner = Mock() self.bisector = Bisector(Mock(), self.test_runner, Mock(), dl_in_background=False) self.bisector.download_background = False # shim for py2.7 if not hasattr(self, "assertRaisesRegex"): self.assertRaisesRegex = self.assertRaisesRegexp
def bisector(self): if self._bisector is None: self._bisector = Bisector( self.fetch_config, self.test_runner, self.build_download_manager, dl_in_background=self.options.background_dl, approx_chooser=(None if self.options.approx_policy != 'auto' else ApproxPersistChooser(7)), ) return self._bisector
def setUp(self): self.handler = Mock(find_fix=False) self.test_runner = Mock() self.bisector = Bisector(Mock(), self.test_runner)