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

Jelmer Vernooij jelmer at samba.org
Fri Dec 3 17:42:24 MST 2010


The branch, master has been updated
       via  7df6716 Add tree module.
      from  a0c2c75 Merge StormCachingBuildFarm and BuildFarm.

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


- Log -----------------------------------------------------------------
commit 7df6716b4a2b721d1522db0ba747092836f8eb1f
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Dec 4 01:42:55 2010 +0100

    Add tree module.

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

Summary of changes:
 buildfarm/build.py |   14 ++++++++++++++
 buildfarm/tree.py  |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+), 0 deletions(-)
 create mode 100644 buildfarm/tree.py


Changeset truncated at 500 lines:

diff --git a/buildfarm/build.py b/buildfarm/build.py
index 0cbe3bf..c708f57 100644
--- a/buildfarm/build.py
+++ b/buildfarm/build.py
@@ -155,6 +155,16 @@ def check_dir_exists(kind, path):
         raise Exception("%s directory %s does not exist" % (kind, path))
 
 
+def extract_phase_output(f):
+    name = None
+    output = None
+    for l in f:
+
+
+def extract_test_output(f):
+    raise NotImplementedError
+
+
 def build_status_from_logs(log, err):
     """get status of build"""
     # FIXME: Perhaps also extract revision here?
@@ -289,6 +299,10 @@ class Build(object):
         """get the age of build"""
         return time.time() - self.upload_time
 
+    def read_subunit(self):
+        """read the test output as subunit"""
+        return StringIO("".join(extract_test_output(self.read_log())))
+
     def read_log(self):
         """read full log file"""
         try:
diff --git a/buildfarm/tree.py b/buildfarm/tree.py
new file mode 100644
index 0000000..b6f7f55
--- /dev/null
+++ b/buildfarm/tree.py
@@ -0,0 +1,47 @@
+
+#!/usr/bin/python
+# Tree support
+#
+# Copyright (C) Jelmer Vernooij <jelmer at samba.org>   2010
+#
+#   This program is free software; you can redistribute it and/or modify
+#   it under the terms of the GNU General Public License as published by
+#   the Free Software Foundation; either version 2 of the License, or
+#   (at your option) any later version.
+#
+#   This program is distributed in the hope that it will be useful,
+#   but WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#   GNU General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License
+#   along with this program; if not, write to the Free Software
+#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+from buildfarm.history import GitBranch
+import os
+
+GIT_ROOT = "/data/git"
+
+
+class Tree(object):
+    """A tree to build."""
+
+    def __init__(self, name, scm, repo, branch, subdir="", srcdir=""):
+        self.name = name
+        self.repo = repo
+        self.scm = scm
+        self.branch = branch
+        self.subdir = subdir
+        self.srcdir = srcdir
+        self.scm = scm
+
+    def get_branch(self):
+        if self.scm == "git":
+            return GitBranch(os.path.join(GIT_ROOT, self.repo), self.branch)
+        else:
+            raise NotImplementedError(self.scm)
+
+    def __repr__(self):
+        return "<%s %r>" % (self.__class__.__name__, self.name)


-- 
build.samba.org


More information about the samba-cvs mailing list