[zorg] r285335 - Use buildbot RemoveDirectory instead of platform-dependent rm/rmdir command.
Galina Kistanova via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 27 12:37:57 PDT 2016
Author: gkistanova
Date: Thu Oct 27 14:37:57 2016
New Revision: 285335
URL: http://llvm.org/viewvc/llvm-project?rev=285335&view=rev
Log:
Use buildbot RemoveDirectory instead of platform-dependent rm/rmdir command.
Modified:
zorg/trunk/zorg/buildbot/builders/ClangAndLLDBuilder.py
Modified: zorg/trunk/zorg/buildbot/builders/ClangAndLLDBuilder.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/ClangAndLLDBuilder.py?rev=285335&r1=285334&r2=285335&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/ClangAndLLDBuilder.py (original)
+++ zorg/trunk/zorg/buildbot/builders/ClangAndLLDBuilder.py Thu Oct 27 14:37:57 2016
@@ -6,6 +6,7 @@ from buildbot.steps.source import SVN
from buildbot.steps.shell import ShellCommand
from buildbot.steps.shell import WarningCountingShellCommand
from buildbot.process.properties import WithProperties
+from buildbot.steps.slave import RemoveDirectory
from zorg.buildbot.commands.LitTestCommand import LitTestCommand
from zorg.buildbot.commands.NinjaCommand import NinjaCommand
@@ -75,16 +76,16 @@ def getClangAndLLDBuildFactory(
workdir='%s/tools/lld' % llvm_srcdir))
# Clean directory, if requested.
- if clean:
- shellCommand = ["rm", "-rf", llvm_objdir]
- if isMSVC:
- shellCommand = ["rmdir", "/S", "/Q", llvm_objdir]
- f.addStep(ShellCommand(name="rm-llvm_objdir",
- command=shellCommand,
- haltOnFailure=False,
- description=["rm build dir", "llvm"],
- workdir=".",
- env=merged_env))
+ cleanBuildRequested = lambda step: step.build.getProperty("clean") or clean
+
+ # This is an incremental build, unless otherwise has been requested.
+ # Remove obj and install dirs for a clean build.
+ f.addStep(RemoveDirectory(name='rm-llvm_objdir',
+ dir=llvm_objdir,
+ haltOnFailure=False,
+ flunkOnFailure=False,
+ doStepIf=cleanBuildRequested,
+ ))
# Create configuration files with cmake.
options = ["-Wdocumentation", "-Wno-documentation-deprecated-sync"]
More information about the llvm-commits
mailing list