def _GetBootstrapStage(self): """Constructs and returns the BootStrapStage object. We return None when there are no chromite patches to test, and --test-bootstrap wasn't passed in. """ stage = None patches_needed = sync_stages.BootstrapStage.BootstrapPatchesNeeded( self._run, self.patch_pool) chromite_branch = git.GetChromiteTrackingBranch() if (patches_needed or self._run.options.test_bootstrap or chromite_branch != self._run.options.branch): stage = sync_stages.BootstrapStage(self._run, self.patch_pool) return stage
def ConstructStage(self): patch_pool = trybot_patch_pool.TrybotPatchPool() return sync_stages.BootstrapStage(self._run, self.buildstore, patch_pool)