From adcf9d6143451c6700aa1ca3763155b3bb986e47 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 11 Sep 2023 13:54:20 +0200 Subject: [PATCH] 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 Signed-off-by: Richard Purdie --- builders.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/builders.py b/builders.py index 38b2018..980459b 100644 --- a/builders.py +++ b/builders.py @@ -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