Skip to content

Commit

Permalink
some details on callable(workdir) behaviour
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
  • Loading branch information
Pierre Tardy committed Dec 29, 2014
1 parent 7fe48c3 commit 4d0ae82
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
5 changes: 0 additions & 5 deletions master/buildbot/process/build.py
Expand Up @@ -336,11 +336,6 @@ def setupBuild(self, expectations):
step = factory.buildStep()
step.setBuild(self)
step.setBuildSlave(self.slavebuilder.slave)
# TODO: remove once we don't have anything depending on setDefaultWorkdir
if callable(self.workdir):
step.setDefaultWorkdir(self.workdir(self.sources))
else:
step.setDefaultWorkdir(self.workdir)
name = step.name
if name in stepnames:
count = stepnames[name]
Expand Down
1 change: 1 addition & 0 deletions master/buildbot/process/buildstep.py
Expand Up @@ -340,6 +340,7 @@ def getWorkdir(self):
if self.workdir is not None:
return self.workdir
else:
# see :ref:`Factory-Workdir-Functions` for details on how to customize this
if callable(self.build.workdir):
return self.build.workdir(self.build.sources)
else:
Expand Down
4 changes: 2 additions & 2 deletions master/docs/developer/cls-buildsteps.rst
Expand Up @@ -141,9 +141,9 @@ BuildStep

* workdir of the step, if defined

* workdir of the codebase, if defined
* workdir of the BuildFactory (itself defaults to 'build').

* workdir of the builder (itself defaults to 'build')
BuildFactory workdir can be a function of sourcestamp. See :ref:`Factory-Workdir-Functions`

.. py:method:: setDefaultWorkdir(workdir)
Expand Down
2 changes: 0 additions & 2 deletions master/docs/relnotes/index.rst
Expand Up @@ -286,8 +286,6 @@ Changes and Removals
* workdir of the step, if defined
* workdir of the codebase, if defined
* workdir of the builder (itself defaults to 'build')
- setDefaultWorkdir() has been deprecated, but is now behaving the same for all the steps: Setting self.workdir if not already set
Expand Down

0 comments on commit 4d0ae82

Please sign in to comment.