builders.py: clobber build dir also when the build was cancelled

This enables faster cleanup of cancelled builds, reducing chance
of disk space running out.

[YOCTO #15205]

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin 2023-09-11 13:54:20 +02:00 committed by Richard Purdie
parent e973085949
commit adcf9d6143

View File

@ -128,11 +128,12 @@ def create_builder_factory():
f.addStep(RunConfigCheckSteps(posttrigger=False))
# If the build was successful, clean up the build directory
# If the build was successful or cancelled, clean up the build directory
f.addStep(steps.ShellCommand(
command=[clob, util.Interpolate("%(prop:builddir)s/")],
doStepIf=lambda step: step.build.results == SUCCESS,
doStepIf=lambda step: step.build.results in (SUCCESS, CANCELLED),
haltOnFailure=False,
alwaysRun=True,
name="Clobber build dir"))
return f