[SCM] build.samba.org - branch master updated
Jelmer Vernooij
jelmer at samba.org
Wed Nov 10 17:50:08 MST 2010
The branch, master has been updated
via e7f5f8b Move lcov cache onto BuildFarm, simplify get_build.
from a6951b8 desactivate history for the moment (it's broken)
http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit e7f5f8bd5485ef4b1a742b6b64aa0cb49008ce01
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Thu Nov 11 01:50:54 2010 +0100
Move lcov cache onto BuildFarm, simplify get_build.
-----------------------------------------------------------------------
Summary of changes:
buildfarm/__init__.py | 20 +++++---------------
buildfarm/data.py | 8 --------
2 files changed, 5 insertions(+), 23 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildfarm/__init__.py b/buildfarm/__init__.py
index 118a729..85690e3 100644
--- a/buildfarm/__init__.py
+++ b/buildfarm/__init__.py
@@ -66,6 +66,7 @@ class BuildFarm(object):
if path is None:
path = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
self.path = path
+ self.cachedir = os.path.join(self.path, "cache")
self.webdir = os.path.join(self.path, "web")
if not os.path.isdir(path):
raise Exception("web directory %s does not exist" % self.webdir)
@@ -99,7 +100,8 @@ class BuildFarm(object):
def lcov_status(self, tree):
"""get status of build"""
from buildfarm import data, util
- cachefile = self.builds.get_lcov_cached_status(self.LCOVHOST, tree)
+ cachefile = os.path.join(self.cachedir, "lcov.%s.%s.status" % (
+ self.LCOVHOST, tree))
file = os.path.join(self.lcovdir, self.LCOVHOST, tree, "index.html")
try:
st1 = os.stat(file)
@@ -130,21 +132,9 @@ class BuildFarm(object):
def get_build(self, tree, host, compiler, rev=None):
if rev:
- if host in self.hostdb.hosts() and\
- tree in self.trees and\
- compiler in self.compilers:
- return self.builds.get_build(tree, host, compiler)
- else:
- from buildfarm import data
- raise data.NoSuchBuildError(tree, host, compiler)
+ return self.builds.get_build(tree, host, compiler, rev)
else:
- if host in [h.name for h in self.hostdb.hosts()] and\
- tree in self.trees and\
- compiler in self.compilers:
- return self.upload_builds.get_build(tree, host, compiler)
- else:
- from buildfarm import data
- raise data.NoSuchBuildError(tree, host, compiler)
+ return self.upload_builds.get_build(tree, host, compiler)
def get_new_builds(self):
from buildfarm import data
diff --git a/buildfarm/data.py b/buildfarm/data.py
index f709422..9f7708c 100644
--- a/buildfarm/data.py
+++ b/buildfarm/data.py
@@ -396,9 +396,6 @@ class BuildResultStore(object):
"""
self.path = path
- def get_lcov_cached_status(self, host, tree):
- return None
-
def get_build(self, tree, host, compiler, rev):
logf = self.build_fname(tree, host, compiler, rev) + ".log"
if not os.path.exists(logf):
@@ -479,8 +476,3 @@ class CachingBuildResultStore(BuildResultStore):
def cache_fname(self, tree, host, compiler, rev):
return os.path.join(self.cachedir, "build.%s.%s.%s-%s" % (tree, host, compiler, rev))
-
- def get_lcov_cached_status(self, host, tree):
- return os.path.join(self.cachedir, "lcov.%s.%s.status" % (host, tree))
-
-
--
build.samba.org
More information about the samba-cvs
mailing list