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

Jelmer Vernooij jelmer at samba.org
Mon Nov 8 14:08:03 MST 2010


The branch, master has been updated
       via  bc21f20 Unbreak the testsuite, rename cache2 back to cache.
       via  ff01797 Cope with missing err files.
      from  b44b5d7 More debug

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


- Log -----------------------------------------------------------------
commit bc21f2021c950145323edef52a5f099ad06e0ece
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Mon Nov 8 22:08:16 2010 +0100

    Unbreak the testsuite, rename cache2 back to cache.

commit ff017973ecf6982f92d8806e6048f17033667795
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Mon Nov 8 22:08:02 2010 +0100

    Cope with missing err files.

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

Summary of changes:
 buildfarm/data.py            |   11 ++++++++---
 buildfarm/tests/test_data.py |    5 +++++
 2 files changed, 13 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/data.py b/buildfarm/data.py
index 950166a..a13b526 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -23,6 +23,7 @@
 
 
 import ConfigParser
+from cStringIO import StringIO
 import hashlib
 import os
 import re
@@ -172,7 +173,11 @@ class Build(object):
 
     def read_err(self):
         """read full err file"""
-        return open(self._store.build_fname(self.tree, self.host, self.compiler, self.rev)+".err", 'r')
+        try:
+            return open(self._store.build_fname(self.tree, self.host, self.compiler, self.rev)+".err", 'r')
+        except IOError:
+            # No such file
+            return StringIO()
 
 
     def log_checksum(self):
@@ -343,8 +348,8 @@ class BuildResultStore(object):
         self.datadir = os.path.join(basedir, "data")
         check_dir_exists("data", self.datadir)
 
-        self.cachedir = os.path.join(basedir, "cache2")
-        check_dir_exists("cache2", self.cachedir)
+        self.cachedir = os.path.join(basedir, "cache")
+        check_dir_exists("cache", self.cachedir)
 
         self.lcovdir = os.path.join(basedir, "lcov/data")
         check_dir_exists("lcov", self.lcovdir)
diff --git a/buildfarm/tests/test_data.py b/buildfarm/tests/test_data.py
index 2cdc5e0..3043b4c 100755
--- a/buildfarm/tests/test_data.py
+++ b/buildfarm/tests/test_data.py
@@ -138,6 +138,11 @@ class BuildResultStoreTests(BuildFarmTestCase):
         build = self.x.get_build("tdb", "charis", "cc")
         self.assertEquals("This is what an stderr file looks like.", build.read_err().read())
 
+    def test_read_err_nofile(self):
+        self.create_mock_logfile("tdb", "charis", "cc")
+        build = self.x.get_build("tdb", "charis", "cc")
+        self.assertEquals("", build.read_err().read())
+
     def test_revision_details(self):
         self.create_mock_logfile("tdb", "charis", "cc", contents="""
 BUILD COMMIT REVISION: 43


-- 
build.samba.org


More information about the samba-cvs mailing list