Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect Buildbot invariants when adding new steps #501

Merged
merged 1 commit into from Oct 3, 2016
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Respect Buildbot invariants when adding new steps

This will prevent crashes when Buildbot tries to execute dynamically
added steps.
  • Loading branch information
aneeshusa committed Oct 3, 2016
commit e9f0519e454bfe0f0204de38f0d1f5cdcbb0dc5d
@@ -204,10 +204,25 @@ def run(self):

pkill_step = [self.make_pkill_step("servo")]

self.build.steps += pkill_step + dynamic_steps
for step in pkill_step + dynamic_steps:
self.add_step(step)

defer.returnValue(result)

def add_step(self, step):
"""\
Adds a new step to this build, making sure to maintain internal
Buildbot invariants.
Semi-polyfill for addStepsAfterLastStep from Buildbot 9.
"""
step.setBuild(self.build)
step.setBuildSlave(self.build.slavebuilder.slave)
step.setDefaultWorkdir(self.workdir)
self.build.steps.append(step)

step_status = self.build.build_status.addStepWithName(step.name)
step.setStepStatus(step_status)

def make_step(self, command):
step_kwargs = {}
step_env = copy.deepcopy(self.environment)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.