diff --git a/.pylintrc b/.pylintrc new file mode 100644 --- /dev/null +++ b/.pylintrc @@ -0,0 +1,7 @@ +# add root folder to Pylint PYTHONPATH, so builders can be checked with zorg.* +# packages +[MASTER] +init-hook='import sys; sys.path.append(".")' + +[FORMAT] +max-line-length=120 diff --git a/zorg/buildbot/builders/ClangBuilder.py b/zorg/buildbot/builders/ClangBuilder.py --- a/zorg/buildbot/builders/ClangBuilder.py +++ b/zorg/buildbot/builders/ClangBuilder.py @@ -4,6 +4,7 @@ from buildbot.process.properties import WithProperties, Property from buildbot.steps.shell import ShellCommand, SetProperty from buildbot.steps.shell import WarningCountingShellCommand +from buildbot.steps.worker import RemoveDirectory import zorg.buildbot.builders.Util as builders_util @@ -309,15 +310,17 @@ ############# CLEANING - f.addStep(ShellCommand(name='clean stage 1', - command=['rm','-rf',stage1_build], - warnOnFailure=True, - haltOnFailure=False, - flunkOnFailure=False, - description='cleaning stage 1', - descriptionDone='clean', - workdir='.', - doStepIf=clean_build_requested)) + # Use the buildbot build-in step "RemoveDirectory". + # http://docs.buildbot.net/current/manual/configuration/buildsteps.html#removedirectory + f.addStep(RemoveDirectory(name='clean stage 1', + dir=stage1_build, + warnOnFailure=True, + haltOnFailure=False, + flunkOnFailure=False, + description='cleaning stage 1', + descriptionDone='clean', + workdir='.', + doStepIf=clean_build_requested)) ############# STAGE 1 @@ -357,14 +360,14 @@ env=env)) if useTwoStage or runTestSuite or stage1_upload_directory: - f.addStep(ShellCommand(name='clean stage 1 install', - command=['rm','-rf',stage1_install], - warnOnFailure=True, - haltOnFailure=False, - flunkOnFailure=False, - description='cleaning stage 1 install', - descriptionDone='clean', - workdir='.')) + f.addStep(RemoveDirectory(name='clean stage 1 install', + dir=stage1_install, + warnOnFailure=True, + haltOnFailure=False, + flunkOnFailure=False, + description='cleaning stage 1 install', + descriptionDone='clean', + workdir='.')) f.addStep(ShellCommand(name='install stage 1', command=ninja_install_cmd, description='ninja install', @@ -393,12 +396,13 @@ # changed on the stage 1, we cannot trust any of the intermediate file # from the old compiler. And if the stage 1 compiler is the same, we # should not build in the first place. - f.addStep(ShellCommand(name='clean stage 2', - command=['rm','-rf',stage2_build], - warnOnFailure=True, - description='cleaning stage 2', - descriptionDone='clean', - workdir='.')) + f.addStep(RemoveDirectory(name='clean stage 2', + dir=stage2_build, + warnOnFailure=True, + description='cleaning stage 2', + descriptionDone='clean', + workdir='.')) + # Absolute paths to just built compilers. # Note: Backslash path separators do not work well with cmake and ninja. @@ -450,12 +454,13 @@ compiler_path = stage1_install if useTwoStage: compiler_path=stage2_install - f.addStep(ShellCommand(name='clean stage 2 install', - command=['rm','-rf',stage2_install], - warnOnFailure=True, - description='cleaning stage 2 install', - descriptionDone='clean', - workdir='.')) + f.addStep(RemoveDirectory(name='clean stage 2 install', + dir=stage2_install, + warnOnFailure=True, + description='cleaning stage 2 install', + descriptionDone='clean', + workdir='.')) + f.addStep(ShellCommand(name='install stage 2', command=ninja_install_cmd, description='ninja install 2', @@ -514,12 +519,13 @@ test_suite_env['CXX'] = cxx # Steps to prepare, build and run LNT - f.addStep(ShellCommand(name='clean sandbox', - command=['rm', '-rf', 'sandbox'], - haltOnFailure=True, - description='removing sandbox directory', - workdir='test', - env=env)) + f.addStep(RemoveDirectory(name='clean sandbox', + dir='sandbox', + haltOnFailure=True, + description='removing sandbox directory', + workdir='test', + env=env)) + f.addStep(ShellCommand(name='recreate sandbox', command=['virtualenv', 'sandbox'], haltOnFailure=True,