Beispiel #1
0
 def bisect_nightlies(self):
     good_date, bad_date = self.options.good, self.options.bad
     handler = NightlyHandler(
         find_fix=self.options.find_fix,
         ensure_good_and_bad=self.options.mode != 'no-first-check',
     )
     result = self._do_bisect(handler, good_date, bad_date)
     if result == Bisection.FINISHED:
         LOG.info("Got as far as we can go bisecting nightlies...")
         handler.print_range()
         if self.fetch_config.can_go_inbound():
             LOG.info("Switching bisection method to taskcluster")
             self.fetch_config.set_repo(
                 self.fetch_config.get_nightly_repo(handler.bad_date))
             return self._bisect_inbounds(handler.good_revision,
                                          handler.bad_revision,
                                          expand=DEFAULT_EXPAND)
     elif result == Bisection.USER_EXIT:
         self._print_resume_info(handler)
     else:
         # NO_DATA
         LOG.info("Unable to get valid builds within the given"
                  " range. You should try to launch mozregression"
                  " again with a larger date range.")
         return 1
     return 0
Beispiel #2
0
    def bisect_nightly(self):
        handler = NightlyHandler(ensure_good_and_bad=True)
        result = self.bisector.bisect(handler, self.good, self.bad)
        if result == Bisection.FINISHED:
            print("Got as far as we can go bisecting nightlies...")
            handler.print_range()
            print("Switching bisection method to taskcluster")
            result = self.bisect_inbound(handler.good_revision,
                                         handler.bad_revision)
        else:
            # TODO(ER): maybe this should be an exception...
            result = (None, None)

        return result
    def bisect(self, fetch_config, options):
        self.stop()

        # global preferences
        global_prefs = get_prefs()
        # apply the global prefs now
        apply_prefs(global_prefs)

        self.bisector = GuiBisector(fetch_config,
                                    persist=global_prefs['persist'])
        # create a QThread, and move self.bisector in it. This will
        # allow to the self.bisector slots (connected after the move)
        # to be automatically called in the thread.
        self.thread = QThread()
        self.bisector.moveToThread(self.thread)
        self.bisector.download_manager.download_progress.connect(
            self.show_dl_progress)
        self.bisector.test_runner.evaluate_started.connect(self.evaluate)
        self.bisector.finished.connect(self.bisection_finished)
        self.bisector_created.emit(self.bisector)
        if options['bisect_type'] == 'nightlies':
            handler = NightlyHandler(find_fix=options['find_fix'])
            good = options['good_date']
            bad = options['bad_date']
        else:
            handler = InboundHandler(find_fix=options['find_fix'])
            good = options['good_changeset']
            bad = options['bad_changeset']

        # options for the app launcher
        launcher_kwargs = {}
        for name in ('profile', 'preferences'):
            if name in options:
                value = options[name]
                if value:
                    launcher_kwargs[name] = value
        self.bisector.test_runner.launcher_kwargs = launcher_kwargs

        self.thread.start()
        self.bisector._bisect_args = (handler, good, bad)
        # this will be called in the worker thread.
        QTimer.singleShot(0, self.bisector.bisect)

        self.running_state_changed.emit(True)
Beispiel #4
0
    def init_worker(self, fetch_config, options):
        AbstractBuildRunner.init_worker(self, fetch_config, options)

        self.worker.test_runner.evaluate_started.connect(self.evaluate)
        self.worker.finished.connect(self.bisection_finished)
        self.worker.handle_merge.connect(self.handle_merge)
        self.worker.choose_next_build.connect(self.choose_next_build)

        good, bad = options.pop('good'), options.pop('bad')
        if is_date_or_datetime(good) and is_date_or_datetime(bad) \
                and not fetch_config.should_use_taskcluster():
            handler = NightlyHandler(find_fix=options['find_fix'])
        else:
            handler = InboundHandler(find_fix=options['find_fix'])

        self.worker._bisect_args = (handler, good, bad)
        self.worker.download_in_background = \
            self.global_prefs['background_downloads']
        return self.worker.bisect
Beispiel #5
0
    def init_worker(self, fetch_config, options):
        AbstractBuildRunner.init_worker(self, fetch_config, options)

        self.worker.test_runner.evaluate_started.connect(self.evaluate)
        self.worker.finished.connect(self.bisection_finished)
        self.worker.handle_merge.connect(self.handle_merge)
        self.worker.choose_next_build.connect(self.choose_next_build)
        good, bad = options.get("good"), options.get("bad")
        if (is_date_or_datetime(good) and is_date_or_datetime(bad)
                and fetch_config.should_use_archive()):
            handler = NightlyHandler(find_fix=options["find_fix"])
        else:
            handler = IntegrationHandler(find_fix=options["find_fix"])

        self.worker._bisect_args = (handler, good, bad)
        self.worker.download_in_background = self.global_prefs[
            "background_downloads"]
        if self.global_prefs["approx_policy"]:
            self.worker.approx_chooser = ApproxPersistChooser(7)
        return self.worker.bisect
Beispiel #6
0
 def setUp(self):
     self.handler = NightlyHandler()