[pypy-commit] buildbot default: define SucceedAlways class, use it to clean out tmp files, clean tmp files recursively

mattip noreply at buildbot.pypy.org
Sat Mar 14 21:08:57 CET 2015


Author: mattip <matti.picus at gmail.com>
Branch: 
Changeset: r940:93843c6cfb4c
Date: 2015-03-14 22:10 +0200
http://bitbucket.org/pypy/buildbot/changeset/93843c6cfb4c/

Log:	define SucceedAlways class, use it to clean out tmp files, clean tmp
	files recursively

diff --git a/bot2/pypybuildbot/builds.py b/bot2/pypybuildbot/builds.py
--- a/bot2/pypybuildbot/builds.py
+++ b/bot2/pypybuildbot/builds.py
@@ -170,6 +170,10 @@
             d[key] = summary
         builder.saveYourself()
 
+class SuccessAlways(ShellCmd):
+    def evaluateCommand(self, cmd):
+        return SUCCESS
+
 # _______________________________________________________________
 # XXX Currently the build properties got_revision and final_file_name contain
 # the revision number and the changeset-id, CheckGotRevision takes care to set
@@ -401,8 +405,8 @@
                    '/D', '-' + nDays, '/c', "cmd /c rmdir /q /s @path"]
     else:
         command = ['find', Interpolate(tmp_or_crazy + pytest), '-mtime',
-                   '+' + nDays, '-exec', 'rm', '{}', ';'] 
-    factory.addStep(PytestCmd(
+                   '+' + nDays, '-exec', 'rm -r', '{}', ';'] 
+    factory.addStep(SuccessAlways(
         description="cleanout old test files",
         command = command,
         flunkOnFailure=False,
@@ -500,8 +504,8 @@
                        '/D', '-' + nDays, '/c', "cmd /c rmdir /q /s @path"]
         else:
             command = ['find', Interpolate(tmp_or_crazy + pytest), '-mtime',
-                       '+' + nDays, '-exec', 'rm', '{}', ';'] 
-        self.addStep(PytestCmd(
+                       '+' + nDays, '-exec', 'rm -r', '{}', ';'] 
+        self.addStep(SuccessAlways(
             description="cleanout old test files",
             command = command,
             flunkOnFailure=False,


More information about the pypy-commit mailing list