diff --git a/zorg/buildbot/builders/ClangBuilder.py b/zorg/buildbot/builders/ClangBuilder.py index 001d824a3..2c375d211 100644 --- a/zorg/buildbot/builders/ClangBuilder.py +++ b/zorg/buildbot/builders/ClangBuilder.py @@ -278,7 +278,8 @@ def _getClangCMakeBuildFactory( f = LLVMBuildFactory( depends_on_projects=depends_on_projects, llvm_srcdir='llvm', - enable_runtimes=enable_runtimes) + enable_runtimes=enable_runtimes, + clean=clean) # Checkout the latest code for LNT # and the test-suite separately. Le's do this first, diff --git a/zorg/buildbot/process/buildrequest.py b/zorg/buildbot/process/buildrequest.py index 594a09d25..ebd6371ef 100644 --- a/zorg/buildbot/process/buildrequest.py +++ b/zorg/buildbot/process/buildrequest.py @@ -31,6 +31,14 @@ def collapseRequests(master, builder, req1, req2): str(req2['buildsetid']) ) + # If the build is going to be a clean build anyway, we can collapse a clean + # build and a non-clean build. + if getattr(builder.config.factory, "clean", False): + if 'clean_obj' in selfBuildsetPoperties: + del selfBuildsetPoperties["clean_obj"] + if 'clean_obj' in otherBuildsetPoperties: + del otherBuildsetPoperties["clean_obj"] + # Check buildsets properties and do not collapse # if properties do not match. This includes the check # for different schedulers. diff --git a/zorg/buildbot/process/factory.py b/zorg/buildbot/process/factory.py index b15bbaa19..a2ac70ca8 100644 --- a/zorg/buildbot/process/factory.py +++ b/zorg/buildbot/process/factory.py @@ -40,6 +40,8 @@ def __init__(self, steps=None, depends_on_projects=None, hint=None, **kwargs): BuildFactory.__init__(self, steps) self.hint = hint + + self.clean = kwargs.pop('clean', False) # Handle the dependencies. if depends_on_projects is None: