[SCM] build.samba.org - branch master updated

Jelmer Vernooij jelmer at samba.org
Fri Nov 12 03:19:37 MST 2010


The branch, master has been updated
       via  36bdf3c Support removing builds.
      from  c155466 Remove some unncessary indirects.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 36bdf3c446ad9100ef78e6a62449b4e339176458
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Fri Nov 12 11:20:15 2010 +0100

    Support removing builds.

-----------------------------------------------------------------------

Summary of changes:
 buildfarm/data.py            |    5 +++++
 buildfarm/tests/test_data.py |    7 +++++++
 import-and-analyse.py        |    1 +
 3 files changed, 13 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/data.py b/buildfarm/data.py
index 26f2775..9f982db 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -177,6 +177,11 @@ class Build(object):
         self.compiler = compiler
         self.rev = rev
 
+    def remove(self):
+        os.unlink(self.basename + ".log")
+        if os.path.exists(self.basename+".err"):
+            os.unlink(self.basename+".err")
+
     ###################
     # the mtime age is used to determine if builds are still happening
     # on a host.
diff --git a/buildfarm/tests/test_data.py b/buildfarm/tests/test_data.py
index 0559f8e..43451da 100755
--- a/buildfarm/tests/test_data.py
+++ b/buildfarm/tests/test_data.py
@@ -40,6 +40,13 @@ class BuildResultStoreTestBase(object):
             self.x.build_fname("mytree", "myhost", "cc", 123),
             "%s/data/oldrevs/build.mytree.myhost.cc-123" % self.path)
 
+    def test_build_remove(self):
+        path = self.create_mock_logfile("tdb", "charis", "cc", "12")
+        build = self.x.get_build("tdb", "charis", "cc", "12")
+        build.remove()
+        self.assertFalse(os.path.exists(path))
+        self.assertRaises(data.NoSuchBuildError, self.x.get_build, "tdb", "charis", "cc", "12")
+
     def test_build_age_mtime(self):
         path = self.create_mock_logfile("tdb", "charis", "cc", "12")
         # Set mtime to something in the past
diff --git a/import-and-analyse.py b/import-and-analyse.py
index 3a77f77..c468a82 100755
--- a/import-and-analyse.py
+++ b/import-and-analyse.py
@@ -103,5 +103,6 @@ for build in buildfarm.get_new_builds():
         prev_build = buildfarm.get_build(build.tree, build.host, build.compiler, prev_rev)
         check_and_send_mails(build.tree, build.host, build.compiler, build, prev_build)
 
+    build.remove()
 
 smtp.quit()


-- 
build.samba.org


More information about the samba-cvs mailing list