rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
ret = self.hosts().find(StormHost.name==name).one() | ret = self.store.find(StormHost, StormHost.name==name).one() | def host(self, name): ret = self.hosts().find(StormHost.name==name).one() if ret is None: raise NoSuchHost(name) return ret |
ostatus += "/".span("status checker", sstatus) | ostatus += "/"+span("status checker", sstatus) | def span_status(st): if st is None: return span("status unknown", "?") elif st == 0: return span("status passed", "ok") else: return span("status failed", st) |
return StormCachingBuildResultStore(os.path.join(self.path, "data", "oldrevs"), self._get_store()) | path = os.path.join(self.path, "data", "oldrevs") return StormCachingBuildResultStore(path, self._get_store()) | def _open_build_results(self): return StormCachingBuildResultStore(os.path.join(self.path, "data", "oldrevs"), self._get_store()) |
return self._get_store().find(StormBuild, StormBuild.host==host).group_by(StormBuild.compiler, StormBuild.tree) | result = self._get_store().find(StormBuild, StormBuild.host == host) return result.group_by(StormBuild.compiler, StormBuild.tree) | def get_host_builds(self, host): return self._get_store().find(StormBuild, StormBuild.host==host).group_by(StormBuild.compiler, StormBuild.tree) |
return "%s/build/%s" % build.log_checksum() | return "%s/build/%s" % (myself, build.log_checksum()) | def build_uri(myself, build): return "%s/build/%s" % build.log_checksum() |
build = self.buildfarm.get_by_checksum(build_checksum) | build = self.buildfarm.builds.get_by_checksum(build_checksum) | def __call__(self, environ, start_response): form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ) fn_name = get_param(form, 'function') or '' myself = wsgiref.util.application_uri(environ) |
if opts.verbose >= 2: print "Processing %s..." % build, | def check_and_send_mails(tree, host, compiler, cur, old): t = buildfarm.trees[tree] (cur_rev, cur_rev_timestamp) = cur.revision_details() cur_status = cur.status() (old_rev, old_rev_timestamp) = old.revision_details() old_status = old.status() if not cur_status.regressed_since(old_status): if opts.verbose >= 3: prin... | |
for rev in t.get_branch().log(from_rev=cur.rev, exclude_revs=set([old.rev])): | for rev in t.get_branch().log(from_rev=cur.revision, exclude_revs=set([old.revision])): | def check_and_send_mails(tree, host, compiler, cur, old): t = buildfarm.trees[tree] (cur_rev, cur_rev_timestamp) = cur.revision_details() cur_status = cur.status() (old_rev, old_rev_timestamp) = old.revision_details() old_status = old.status() if not cur_status.regressed_since(old_status): if opts.verbose >= 3: prin... |
msg["To"] = ",".join(recipients.keys()) | msg["To"] = ",".join(recipients) | def check_and_send_mails(tree, host, compiler, cur, old): t = buildfarm.trees[tree] (cur_rev, cur_rev_timestamp) = cur.revision_details() cur_status = cur.status() (old_rev, old_rev_timestamp) = old.revision_details() old_status = old.status() if not cur_status.regressed_since(old_status): if opts.verbose >= 3: prin... |
assert build.log_checksum() != prev_build.log_checksum() | def check_and_send_mails(tree, host, compiler, cur, old): t = buildfarm.trees[tree] (cur_rev, cur_rev_timestamp) = cur.revision_details() cur_status = cur.status() (old_rev, old_rev_timestamp) = old.revision_details() old_status = old.status() if not cur_status.regressed_since(old_status): if opts.verbose >= 3: prin... | |
return "<a href='%s' title='View recent builds for %s'>%s:%s</a>" % (tree.name, tree.name, tree.branch) | return "<a href='%s' title='View recent builds for %s'>%s:%s</a>" % (tree_uri(myself, tree), tree.name, tree.name, tree.branch) | def tree_link(myself, tree): """return a link to a particular tree""" return "<a href='%s' title='View recent builds for %s'>%s:%s</a>" % (tree.name, tree.name, tree.branch) |
yield self.upload_builds.get_build(host, tree, compiler) | yield self.upload_builds.get_build(host.name, tree, compiler) | def get_new_builds(self): from buildfarm import data for host in self.hostdb.hosts(): for tree in self.trees: for compiler in self.compilers: # By building the log file name this way, using only the list of # hosts, trees and compilers as input, we ensure we # control the inputs try: yield self.upload_builds.get_build(... |
revision, revision_time = build.revision_details() | (revision, commit_revision, revision_time) = build.revision_details() if commit_revision: revision = commit_revision | def view_host(myself, output_type, *requested_hosts): """print the host's table of information""" if output_type == 'text': yield "Host summary:\n" else: yield "<div class='build-section' id='build-summary'>" yield '<h2>Host summary:</h2>' for host in requested_hosts: assert host in hosts, "unknown host" for host in... |
yield self.upload_builds.get_build(host.name, tree, compiler) | yield self.upload_builds.get_build(tree, host.name, compiler) | def get_new_builds(self): from buildfarm import data for host in self.hostdb.hosts(): for tree in self.trees: for compiler in self.compilers: # By building the log file name this way, using only the list of # hosts, trees and compilers as input, we ensure we # control the inputs try: yield self.upload_builds.get_build(... |
return "%s?function=View+Build;%s'>%s</a>" % (myself, ";".join(["%s=%s" % k for k in params.iteritems()])) | return "%s?function=View+Build;%s" % (myself, ";".join(["%s=%s" % k for k in params.iteritems()])) | def build_uri(myself, build): params = { "host": build.host, "tree": build.tree, "compiler": build.compiler, "checksum": build.log_checksum(), } if build.revision: params["revision"] = build.revision return "%s?function=View+Build;%s'>%s</a>" % (myself, ";".join(["%s=%s" % k for k in params.iteritems()])) |
if standalone and environ['PATH_INFO']: dir = os.path.join(os.path.dirname(__file__)) if re.match("^/[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)?", environ['PATH_INFO']): static_file = "%s/%s" % (dir, environ['PATH_INFO']) if os.path.exists(static_file): tab = environ['PATH_INFO'].split('.') if len(tab) > 1: extension = tab[-1] i... | def __call__(self, environ, start_response): form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ) fn_name = get_param(form, 'function') or '' myself = wsgiref.util.application_uri(environ) | |
if standalone: yield " <link rel='stylesheet' href='common.css' type='text/css' media='all'/>" else: yield " <link rel='stylesheet' href='http://master.samba.org/samba/style/common.css' type='text/css' media='all'/>" | yield " <link rel='stylesheet' href='http://master.samba.org/samba/style/common.css' type='text/css' media='all'/>" | def __call__(self, environ, start_response): form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ) fn_name = get_param(form, 'function') or '' myself = wsgiref.util.application_uri(environ) |
standalone = 1 | def __call__(self, environ, start_response): form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ) fn_name = get_param(form, 'function') or '' myself = wsgiref.util.application_uri(environ) | |
httpd = make_server('localhost', 8000, buildApp) | def standaloneApp(environ, start_response): if environ['PATH_INFO']: dir = os.path.join(os.path.dirname(__file__)) if re.match("^/[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)?", environ['PATH_INFO']): static_file = "%s/%s" % (dir, environ['PATH_INFO']) if os.path.exists(static_file): tab = environ['PATH_INFO'].split('.') if len(ta... | def __call__(self, environ, start_response): form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ) fn_name = get_param(form, 'function') or '' myself = wsgiref.util.application_uri(environ) |
if cachedirname: self.cachedir = os.path.join(self.path, cachedirname) | def _get_cachedir(self): if self._cachedirname is not None: return os.path.join(self.path, self._cachedirname) | def __init__(self, path=None, readonly=False, cachedirname=None): super(CachingBuildFarm, self).__init__(path) |
self.cachedir = os.path.join(self.path, "cache") self.builds = self._open_build_results() self.upload_builds = self._open_upload_build_results() self.readonly = readonly | return os.path.join(self.path, "cache") | def __init__(self, path=None, readonly=False, cachedirname=None): super(CachingBuildFarm, self).__init__(path) |
self.cachedir, reaodnly=self.readonly) | self._get_cachedir(), readonly=self.readonly) | def _open_build_results(self): from buildfarm import data return data.CachingBuildResultStore(os.path.join(self.path, "data", "oldrevs"), self.cachedir, reaodnly=self.readonly) |
self.cachedir, readonly=self.readonly) | self._get_cachedir(), readonly=self.readonly) | def _open_upload_build_results(self): from buildfarm import data return data.CachingUploadBuildResultStore(os.path.join(self.path, "data", "upload"), self.cachedir, readonly=self.readonly) |
cachefile = os.path.join(self.cachedir, | cachefile = os.path.join(self._get_cachedir(), | def lcov_status(self, tree): """get status of build""" from buildfarm import data, util 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) except OSError: # File does not exist raise data.NoSu... |
rawstatus = build.status() status = html_build_status(rawstatus) | status = html_build_status(build.status()) | def build_status_html(myself, build): rawstatus = build.status() status = html_build_status(rawstatus) return build_link(myself, build.tree, build.host, build.compiler, build.revision, status) |
revs = self.buildfarm.builds.get_old_revs(tree, host, compiler) if len(revs) == 0: | old_rev_builds = self.buildfarm.builds.get_old_revs(tree, host, compiler) if len(old_rev_builds) == 0: | def show_oldrevs(self, myself, tree, host, compiler): """show the available old revisions, if any""" revs = self.buildfarm.builds.get_old_revs(tree, host, compiler) |
lastrev = "" for rev in revs: s = html_build_status(rev["STATUS"]) revision = rev["REVISION"] s = s.replace(revision, "0") if s == lastrev: continue lastrev = s yield "<tr><td>%s</td><td>%s</td></tr>" % (revision_link(myself, revision, tree), build_link(myself, tree, host, compiler, rev["REVISION"], html_build_status(r... | for build in old_rev_builds: revision = build.revision yield "<tr><td>%s</td><td>%s</td></tr>" % ( revision_link(myself, revision, tree), build_link(myself, tree, host, compiler, revision, html_build_status(build.status()))) yield "</tbody></table>" | def show_oldrevs(self, myself, tree, host, compiler): """show the available old revisions, if any""" revs = self.buildfarm.builds.get_old_revs(tree, host, compiler) |
self.buildfarm.hostdb.host(host) | def render(self, myself, tree, host, compiler, rev, plain_logs=False): """view one build in detail""" # ensure the params are valid before using them #assert host in self.buildfarm.hostdb, "unknown host %s" % host assert compiler in self.buildfarm.compilers, "unknown compiler %s" % compiler assert tree in self.buildfar... | |
output = "".join(print_log_cc_checker(output)) | output = print_log_cc_checker(output) | def _pretty_print(self, m): output = m.group(1) actionName = m.group(2) status = m.group(3) # handle pretty-printing of static-analysis tools if actionName == 'cc_checker': output = "".join(print_log_cc_checker(output)) |
return "".join(make_collapsible_html('action', actionName, output, self.indice, status)) | return make_collapsible_html('action', actionName, output, self.indice, status) | def _pretty_print(self, m): output = m.group(1) actionName = m.group(2) status = m.group(3) # handle pretty-printing of static-analysis tools if actionName == 'cc_checker': output = "".join(print_log_cc_checker(output)) |
return "".join(make_collapsible_html('test', m.group(1), m.group(2), self.indice, m.group(3))) | return make_collapsible_html('test', m.group(1), m.group(2), self.indice, m.group(3)) | def _format_stage(self, m): self.indice += 1 return "".join(make_collapsible_html('test', m.group(1), m.group(2), self.indice, m.group(3))) |
return "".join(make_collapsible_html('test', m.group(1), '', self.indice, 'skipped')) | return make_collapsible_html('test', m.group(1), '', self.indice, 'skipped') | def _format_skip_testsuite(self, m): self.indice += 1 return "".join(make_collapsible_html('test', m.group(1), '', self.indice, 'skipped')) |
return "".join(make_collapsible_html('test', testName, content+errorReason, self.indice, status)) | return make_collapsible_html('test', testName, content+errorReason, self.indice, status) | def _format_testsuite(self, m): testName = m.group(1) content = m.group(2) status = subunit_to_buildfarm_result(m.group(3)) if m.group(4): errorReason = format_subunit_reason(m.group(4)) else: errorReason = "" self.indice += 1 return "".join(make_collapsible_html('test', testName, content+errorReason, self.indice, stat... |
return "".join(make_collapsible_html('test', m.group(1), m.group(2)+format_subunit_reason(m.group(4)), self.indice, subunit_to_buildfarm_result(m.group(3)))) | return make_collapsible_html('test', m.group(1), m.group(2)+format_subunit_reason(m.group(4)), self.indice, subunit_to_buildfarm_result(m.group(3))) | def _format_test(self, m): self.indice += 1 return "".join(make_collapsible_html('test', m.group(1), m.group(2)+format_subunit_reason(m.group(4)), self.indice, subunit_to_buildfarm_result(m.group(3)))) |
yield "here" return | return "here" return input | def print_log_cc_checker(input): # generate pretty-printed html for static analysis tools # for now, we only handle the IBM Checker's output style if not re.search("^BEAM_VERSION", input): yield "here" # yield input return content = "" inEntry = False title = None status = None for line in input.splitlines(): # for e... |
yield "".join(make_collapsible_html('cc_checker', title, content, id, status)) | output += make_collapsible_html('cc_checker', title, content, id, status) | def print_log_cc_checker(input): # generate pretty-printed html for static analysis tools # for now, we only handle the IBM Checker's output style if not re.search("^BEAM_VERSION", input): yield "here" # yield input return content = "" inEntry = False title = None status = None for line in input.splitlines(): # for e... |
yield content | output += content | def print_log_cc_checker(input): # generate pretty-printed html for static analysis tools # for now, we only handle the IBM Checker's output style if not re.search("^BEAM_VERSION", input): yield "here" # yield input return content = "" inEntry = False title = None status = None for line in input.splitlines(): # for e... |
yield "<div class='%s unit %s' id='%s-%s'>" % (type, status, type, id) yield "<a href=\"javascript:handle('%s');\">" % id yield "<img id='img-%s' name='img-%s' alt='%s' src='%s' />" %(id, id, status, icon) yield "<div class='%s title'>%s</div></a>\n" % (type, title) yield "<div class='%s status %s'>%s</div>\n" % (type,... | ret = "<div class='%s unit %s' id='%s-%s'>" % (type, status, type, id) ret += "<a href=\"javascript:handle('%s');\">" % id ret += "<img id='img-%s' name='img-%s' alt='%s' src='%s' />" %(id, id, status, icon) ret += "<div class='%s title'>%s</div></a>" % (type, title) ret += "<div class='%s status %s'>%s</div>" % (type... | def make_collapsible_html(type, title, output, id, status=""): """generate html for a collapsible section :param type: the logical type of it. e.g. "test" or "action" :param title: the title to be displayed """ if ((status == "" or "failed" == status.lower())): icon = 'icon_hide_16.png' else: icon = 'icon_unhide_16.pn... |
yield "<pre>%s</pre>\n" % (output) yield "</div></div>\n" | ret += "<pre>%s</pre>>" % (output) ret += "</div></div>" return ret | def make_collapsible_html(type, title, output, id, status=""): """generate html for a collapsible section :param type: the logical type of it. e.g. "test" or "action" :param title: the title to be displayed """ if ((status == "" or "failed" == status.lower())): icon = 'icon_hide_16.png' else: icon = 'icon_unhide_16.pn... |
yield " <a href=\"%s/?p=%s;a=history;f=%s%s;h=%s;hb=%s\">%s</a>" % (GITWEB_BASE, t.repo, t.subdir, path, t.branch, t.branch, path) | ret += " <a href=\"%s/?p=%s;a=history;f=%s%s;h=%s;hb=%s\">%s</a>" % (GITWEB_BASE, t.repo, t.subdir, path, t.branch, t.branch, path) return ret | def web_paths(t, paths): """change the given source paths into links""" if t.scm == "git": for path in paths: yield " <a href=\"%s/?p=%s;a=history;f=%s%s;h=%s;hb=%s\">%s</a>" % (GITWEB_BASE, t.repo, t.subdir, path, t.branch, t.branch, path) else: raise Exception("Unknown scm %s" % t.scm) |
yield "".join(web_paths(tree, modified)) | yield web_paths(tree, modified) | def history_row_html(myself, entry, tree, changes): """show one row of history table""" msg = cgi.escape(entry.message) t = time.asctime(time.gmtime(entry.date)) age = util.dhm_time(time.time()-entry.date) t = t.replace(" ", " ") yield """ |
yield "".join(web_paths(tree, added)) | yield web_paths(tree, added) | def history_row_html(myself, entry, tree, changes): """show one row of history table""" msg = cgi.escape(entry.message) t = time.asctime(time.gmtime(entry.date)) age = util.dhm_time(time.time()-entry.date) t = t.replace(" ", " ") yield """ |
yield "".join(web_paths(tree, removed)) | yield web_paths(tree, removed) | def history_row_html(myself, entry, tree, changes): """show one row of history table""" msg = cgi.escape(entry.message) t = time.asctime(time.gmtime(entry.date)) age = util.dhm_time(time.time()-entry.date) t = t.replace(" ", " ") yield """ |
log = cgi.escape(log) m = re.search("(.*)", log) if m: uname = m.group(1) else: uname = "" m = re.search("CFLAGS=(.*)", log) if m: cflags = m.group(1) else: cflags = "" m = re.search("configure options: (.*)", log) if m: config = m.group(1) else: config = "" err = cgi.escape(err) yield '<h2>Host information:</h2>\n' | if log: log = cgi.escape(log) m = re.search("(.*)", log) if m: uname = m.group(1) m = re.search("CFLAGS=(.*)", log) if m: cflags = m.group(1) m = re.search("configure options: (.*)", log) if m: config = m.group(1) if err: err = cgi.escape(err) yield '<h2>Host information:</h2>' | def render(self, myself, tree, host, compiler, rev, plain_logs=False): """view one build in detail""" |
yield ("<tr><td>Host:</td><td><a href='%s?function=View+Host;host=%s;tree=%s;" "compiler=%s (myself, host, tree, compiler, host, self.buildfarm.hostdb.host(host).platform.encode("utf-8"))) | yield "<tr><td>Host:</td><td><a href='%s?function=View+Host;host=%s;tree=%s;"\ "compiler=%s (myself, host, tree, compiler, host, self.buildfarm.hostdb.host(host).platform.encode("utf-8")) | def render(self, myself, tree, host, compiler, rev, plain_logs=False): """view one build in detail""" |
yield "<div id='log'>\n" | yield "<div id='log'>" | def render(self, myself, tree, host, compiler, rev, plain_logs=False): """view one build in detail""" |
yield ("<p>Switch to the <a href='%s?function=View+Build;host=%s;tree=%s" ";compiler=%s%s;plain=true' title='Switch to bland, non-javascript," " unstyled view'>Plain View</a></p>" % (myself, host, tree, compiler, rev_var)) yield "<div id='actionList'>\n" | yield "<p>Switch to the <a href='%s?function=View+Build;host=%s;tree=%s"\ ";compiler=%s%s;plain=true' title='Switch to bland, non-javascript,"\ " unstyled view'>Plain View</a></p>" % (myself, host, tree, compiler, rev_var) yield "<div id='actionList'>" | def render(self, myself, tree, host, compiler, rev, plain_logs=False): """view one build in detail""" |
yield "<h2>Error log:</h2>\n" yield "".join(make_collapsible_html('action', "Error Output", "\n%s" % err, "stderr-0", "errorlog")) | yield "<h2>Error log:</h2>" yield make_collapsible_html('action', "Error Output", "\n%s" % err, "stderr-0", "errorlog") | def render(self, myself, tree, host, compiler, rev, plain_logs=False): """view one build in detail""" |
yield "<h2>No build log available</h2>\n" | yield "<h2>No build log available</h2>" | def render(self, myself, tree, host, compiler, rev, plain_logs=False): """view one build in detail""" |
yield "<p><small>Some of the above icons derived from the <a href='http://www.gnome.org'>Gnome Project</a>'s stock icons.</small></p>\n" yield "</div>\n" | yield "<p><small>Some of the above icons derived from the <a href='http://www.gnome.org'>Gnome Project</a>'s stock icons.</small></p>" yield "</div>" | def render(self, myself, tree, host, compiler, rev, plain_logs=False): """view one build in detail""" |
yield ("<p>Switch to the <a href='%s?function=View+Build;host=%s;tree=%s;" "compiler=%s%s' title='Switch to colourful, javascript-enabled, styled" " view'>Enhanced View</a></p>\n" % (myself, host, tree, compiler, rev_var)) | yield "<p>Switch to the <a href='%s?function=View+Build;host=%s;tree=%s;"\ "compiler=%s%s' title='Switch to colourful, javascript-enabled, styled"\ " view'>Enhanced View</a></p>" % (myself, host, tree, compiler, rev_var) | def render(self, myself, tree, host, compiler, rev, plain_logs=False): """view one build in detail""" |
yield "<h2>No error log available</h2>\n" | yield "<h2>No error log available</h2>" | def render(self, myself, tree, host, compiler, rev, plain_logs=False): """view one build in detail""" |
yield '<div id="errorLog"><pre>%s</pre></div>\n' % err | yield '<div id="errorLog"><pre>%s</pre></div>' % err | def render(self, myself, tree, host, compiler, rev, plain_logs=False): """view one build in detail""" |
yield '<h2>No build log available</h2>\n' | yield '<h2>No build log available</h2>' | def render(self, myself, tree, host, compiler, rev, plain_logs=False): """view one build in detail""" |
yield '<div id="buildLog"><pre>%s</pre></div>\n' % log yield '</div>\n' | yield '<div id="buildLog"><pre>%s</pre></div>' % log yield '</div>' | def render(self, myself, tree, host, compiler, rev, plain_logs=False): """view one build in detail""" |
for build in self.buildfarm.get_tree_builds(tree=tree): | for build in self.buildfarm.get_tree_builds(tree): | def render(self, myself, tree, sort_by): """Draw the "recent builds" view""" last_host = "" all_builds = [] |
yield "<div id='recent-builds' class='build-section'>\n" yield "<h2>Recent builds of %s (%s branch %s)</h2>\n" % (tree, t.scm, t.branch) yield "<table class='real'>\n" yield "<thead>\n" yield "<tr>\n" yield "<th><a href='%s;sortby=age' title='Sort by build age'>Age</a></th>\n" % sorturl yield "<th><a href='%s;sortby=re... | yield "<div id='recent-builds' class='build-section'>" yield "<h2>Recent builds of %s (%s branch %s)</h2>" % (tree, t.scm, t.branch) yield "<table class='real'>" yield "<thead>" yield "<tr>" yield "<th><a href='%s;sortby=age' title='Sort by build age'>Age</a></th>" % sorturl yield "<th><a href='%s;sortby=revision' titl... | def render(self, myself, tree, sort_by): """Draw the "recent builds" view""" last_host = "" all_builds = [] |
yield "<tr>\n" yield "<td>%s</td>\n" % util.dhm_time(build[0]) yield "<td>%s</td>\n" % build[7] yield "<td>%s</td>\n" % build[4] yield "<td>%s</td>\n" % build[1] yield "<td>%s</td>\n" % build[2] yield "<td>%s</td>\n" % build[3] yield "<td>%s</td>\n" % build[5] yield "</tr>\n" yield "</tbody></table>\n" yield "</div>\n" | yield "<tr>" yield "<td>%s</td>" % util.dhm_time(build[0]) yield "<td>%s</td>" % build[7] yield "<td>%s</td>" % build[4] yield "<td>%s</td>" % build[1] yield "<td>%s</td>" % build[2] yield "<td>%s</td>" % build[3] yield "<td>%s</td>" % build[5] yield "</tr>" yield "</tbody></table>" yield "</div>" | def render(self, myself, tree, sort_by): """Draw the "recent builds" view""" last_host = "" all_builds = [] |
yield "<div class='host summary'>\n" yield "<a id='host' name='host'/>\n" yield "<h3>%s - %s</h3>\n" % (host, self.buildfarm.hostdb.host(host).platform.encode("utf-8")) yield "<table class='real'>\n" yield "<thead><tr><th>Target</th><th>Build<br/>Revision</th><th>Build<br />Age</th><th>Status<br />config/build<br />ins... | yield "<div class='host summary'>" yield "<a id='host' name='host'/>" yield "<h3>%s - %s</h3>" % (host, self.buildfarm.hostdb.host(host).platform.encode("utf-8")) yield "<table class='real'>" yield "<thead><tr><th>Target</th><th>Build<br/>Revision</th><th>Build<br />Age</th><th>Status<br />config/build<br />install/tes... | def _render_build_list_header(self, host): yield "<div class='host summary'>\n" yield "<a id='host' name='host'/>\n" yield "<h3>%s - %s</h3>\n" % (host, self.buildfarm.hostdb.host(host).platform.encode("utf-8")) yield "<table class='real'>\n" yield "<thead><tr><th>Target</th><th>Build<br/>Revision</th><th>Build<br />Ag... |
yield "<tr>\n" yield "<td><span class='tree'>%s</span>/%s</td>\n" % (self.tree_link(myself, build.tree), build.compiler) yield "<td>%s</td>\n" % revision_link(myself, revision, build.tree) yield "<td><div class='age'>%s</div></td>\n" % self.red_age(build.age) yield "<td><div class='status'>%s</div></td>\n" % status yie... | yield "<tr>" yield "<td><span class='tree'>" + self.tree_link(myself, build.tree) +"</span>/" + build.compiler + "</td>" yield "<td>" + revision_link(myself, revision, build.tree) + "</td>" yield "<td><div class='age'>" + self.red_age(build.age) + "</div></td>" yield "<td><div class='status'>%s</div></td>" % status yie... | def _render_build_html(self, myself, build): try: (revision, revision_time) = build.revision_details() except data.MissingRevisionInfo: revision = None warnings = build.err_count() status = build_status_html(myself, build) yield "<tr>\n" yield "<td><span class='tree'>%s</span>/%s</td>\n" % (self.tree_link(myself, build... |
yield "<div class='build-section' id='build-summary'>\n" yield '<h2>Host summary:</h2>\n' | yield "<div class='build-section' id='build-summary'>" yield '<h2>Host summary:</h2>' | def render_html(self, myself, *requested_hosts): yield "<div class='build-section' id='build-summary'>\n" yield '<h2>Host summary:</h2>\n' for host in requested_hosts: builds = list(self.buildfarm.get_host_builds(host)) if len(builds) > 0: yield "".join(self._render_build_list_header(host)) for build in builds: yield "... |
yield "</tbody></table>\n" yield "</div>\n" | yield "</tbody></table>" yield "</div>" | def render_html(self, myself, *requested_hosts): yield "<div class='build-section' id='build-summary'>\n" yield '<h2>Host summary:</h2>\n' for host in requested_hosts: builds = list(self.buildfarm.get_host_builds(host)) if len(builds) > 0: yield "".join(self._render_build_list_header(host)) for build in builds: yield "... |
yield "</div>\n" | yield "</div>" | def render_html(self, myself, *requested_hosts): yield "<div class='build-section' id='build-summary'>\n" yield '<h2>Host summary:</h2>\n' for host in requested_hosts: builds = list(self.buildfarm.get_host_builds(host)) if len(builds) > 0: yield "".join(self._render_build_list_header(host)) for build in builds: yield "... |
yield "<div class='build-section' id='dead-hosts'>\n" yield "<h2>Dead Hosts:</h2>\n" yield "<table class='real'>\n" yield "<thead><tr><th>Host</th><th>OS</th><th>Min Age</th></tr></thead>\n" yield "<tbody>\n" | yield "<div class='build-section' id='dead-hosts'>" yield "<h2>Dead Hosts:</h2>" yield "<table class='real'>" yield "<thead><tr><th>Host</th><th>OS</th><th>Min Age</th></tr></thead>" yield "<tbody>" | def draw_dead_hosts(self, *deadhosts): """Draw the "dead hosts" table""" |
yield "<tr><td>%s</td><td>%s</td><td>%s</td></tr>\n" %\ | yield "<tr><td>%s</td><td>%s</td><td>%s</td></tr>" %\ | def draw_dead_hosts(self, *deadhosts): """Draw the "dead hosts" table""" |
yield "</tbody></table>\n" yield "</div>\n" | yield "</tbody></table>" yield "</div>" | def draw_dead_hosts(self, *deadhosts): """Draw the "dead hosts" table""" |
yield "<div id='build-counts' class='build-section'>\n" yield "<h2>Build counts:</h2>\n" yield "<table class='real'>\n" yield "<thead><tr><th>Tree</th><th>Total</th><th>Broken</th><th>Panic</th><th>Test coverage</th></tr></thead>\n" yield "<tbody>\n" | yield "<div id='build-counts' class='build-section'>" yield "<h2>Build counts:</h2>" yield "<table class='real'>" yield "<thead><tr><th>Tree</th><th>Total</th><th>Broken</th><th>Panic</th><th>Test coverage</th></tr></thead>" yield "<tbody>" | def render_html(self, myself): """view build summary""" |
yield "<tr>\n" yield "<td>%s</td>\n" % self.tree_link(myself, tree) yield "<td>%s</td>\n" % host_count[tree] yield "<td>%s</td>\n" % broken_count[tree] | yield "<tr>" yield "<td>%s</td>" % self.tree_link(myself, tree) yield "<td>%s</td>" % host_count[tree] yield "<td>%s</td>" % broken_count[tree] | def render_html(self, myself): """view build summary""" |
yield "<td class='panic'>\n" | yield "<td class='panic'>" | def render_html(self, myself): """view build summary""" |
yield "<td>\n" yield "%d</td>\n" % panic_count[tree] | yield "<td>" yield "%d</td>" % panic_count[tree] | def render_html(self, myself): """view build summary""" |
yield "<td></td>\n" | yield "<td></td>" | def render_html(self, myself): """view build summary""" |
yield "<td><a href=\"/lcov/data/%s/%s\">%s %%</a></td>\n" % ( | yield "<td><a href=\"/lcov/data/%s/%s\">%s %%</a></td>" % ( | def render_html(self, myself): """view build summary""" |
yield "<td></td>\n" yield "</tr>\n" yield "</tbody></table>\n" yield "</div>\n" | yield "<td></td>" yield "</tr>" yield "</tbody></table>" yield "</div>" | def render_html(self, myself): """view build summary""" |
yield "<form method='GET'>\n" yield "Select Author: \n" | yield "<form method='GET'>" yield "Select Author: " | def render(self, myself, tree, author=None): t = self.buildfarm.trees[tree] interesting = list() authors = {"ALL": "ALL"} branch = t.get_branch() re_author = re.compile("^(.*) <(.*)>$") for entry in branch.log(limit=HISTORY_HORIZON): m = re_author.match(entry.author) authors[m.group(2)] = m.group(1) if author in ("ALL"... |
yield " <meta name='robots' contents='noindex'/>\n" yield " <link rel='stylesheet' href='/build_farm.css' type='text/css' media='all'/>\n" yield " <link rel='stylesheet' href='http://master.samba.org/samba/style/common.css' type='text/css' media='all'/>\n" yield " <link rel='shortcut icon' href='http://www.... | yield " <meta name='robots' contents='noindex'/>" yield " <link rel='stylesheet' href='/build_farm.css' type='text/css' media='all'/>" yield " <link rel='stylesheet' href='http://master.samba.org/samba/style/common.css' type='text/css' media='all'/>" yield " <link rel='shortcut icon' href='http://www.samba.... | def __call__(self, environ, start_response): form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ) fn_name = get_param(form, 'function') or '' myself = wsgiref.util.application_uri(environ) |
yield "</body>\n" yield "</html>\n" | yield "</body>" yield "</html>" | def __call__(self, environ, start_response): form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ) fn_name = get_param(form, 'function') or '' myself = wsgiref.util.application_uri(environ) |
if opts.verbose: | if opts.verbose >= 1: | def check_and_send_mails(tree, host, compiler, cur, old): t = buildfarm.trees[tree] (cur_rev, cur_rev_timestamp) = cur.revision_details() cur_status = cur.status() (old_rev, old_rev_timestamp) = old.revision_details() old_status = old.status() if not cur_status.regressed_since(old_status): if opts.verbose: print "th... |
(rev, commit_rev, rev_timestamp) = build.revision_details() | (rev, rev_timestamp) = build.revision_details() | def check_and_send_mails(tree, host, compiler, cur, old): t = buildfarm.trees[tree] (cur_rev, cur_rev_timestamp) = cur.revision_details() cur_status = cur.status() (old_rev, old_rev_timestamp) = old.revision_details() old_status = old.status() if not cur_status.regressed_since(old_status): if opts.verbose: print "th... |
previous_build = self.buildfarm.builds.get_previous_build(build.tree, build.host, build.compiler. build.revision) | previous_build = self.buildfarm.builds.get_previous_build(build.tree, build.host, build.compiler, build.revision) | def render(self, myself, build, plain_logs=False): """view one build in detail""" |
build_uri(myself, build), previous.log_checksum()) | build_uri(myself, build), previous_build.log_checksum()) | def render(self, myself, build, plain_logs=False): """view one build in detail""" |
smtp.send(msg["From"], [msg["To"]], msg.as_string()) | smtp.sendmail(msg["From"], [msg["To"]], msg.as_string()) | def check_and_send_mails(tree, host, compiler, cur, old): t = buildfarm.trees[tree] (cur_rev, cur_rev_timestamp) = cur.revision_details() cur_status = cur.status() (old_rev, old_rev_timestamp) = old.revision_details() old_status = old.status() if not cur_status.regressed_since(old_status): if opts.verbose >= 3: prin... |
See %s | See %(build_link)s | def check_and_send_mails(cur, old): t = buildfarm.trees[cur.tree] cur_rev = cur.revision_details() cur_status = cur.status() old_rev = old.revision_details() old_status = old.status() if not cur_status.regressed_since(old_status): if opts.verbose >= 3: print "... hasn't regressed since %s: %s" % (old_rev, old_status... |
return "<span clsas='old'>%s</span>" % util.dhm_time(age) | return "<span class='old'>%s</span>" % util.dhm_time(age) | def red_age(self, age): """show an age as a string""" if age > self.buildfarm.OLDAGE: return "<span clsas='old'>%s</span>" % util.dhm_time(age) return util.dhm_time(age) |
self.assertEquals(("42", "3 August 2010"), build.revision_details()) | self.assertEquals(("43", "3 August 2010"), build.revision_details()) | def test_revision_details(self): self.create_mock_logfile("tdb", "charis", "cc", contents=""" |
self.assertEquals(("42", None), build.revision_details()) | self.assertEquals(("43", None), build.revision_details()) | def test_revision_details_no_timestamp(self): self.create_mock_logfile("tdb", "charis", "cc", contents=""" |
self.assertEquals((None, None, None, None, None), s.stages) | self.assertEquals((None, None, None, None), s.stages) | def test_nothing(self): s = data.build_status_from_logs("", "") self.assertEquals((None, None, None, None, None), s.stages) self.assertEquals(set(), s.other_failures) |
try: (revision, revision_time) = build.revision_details() except data.MissingRevisionInfo: revision = None | def _render_build_html(self, myself, build): try: (revision, revision_time) = build.revision_details() except data.MissingRevisionInfo: revision = None warnings = build.err_count() yield "<tr>" yield "<td><span class='tree'>" + self.tree_link(myself, build.tree) +"</span>/" + build.compiler + "</td>" yield "<td>" + rev... | |
yield "<td>" + revision_link(myself, revision, build.tree) + "</td>" | yield "<td>" + revision_link(myself, build.revision, build.tree) + "</td>" | def _render_build_html(self, myself, build): try: (revision, revision_time) = build.revision_details() except data.MissingRevisionInfo: revision = None warnings = build.err_count() yield "<tr>" yield "<td><span class='tree'>" + self.tree_link(myself, build.tree) +"</span>/" + build.compiler + "</td>" yield "<td>" + rev... |
if "timeout" in self.other_failures and "timeout" in older.other_failures: | if ("timeout" in self.other_failures and "timeout" in older.other_failures): | def regressed_since(self, older): """Check if this build has regressed since another build.""" if "disk full" in self.other_failures: return False if "timeout" in self.other_failures and "timeout" in older.other_failures: # When the timeout happens exactly can differ slightly, so it's okay # if the numbers are a bit di... |
if "panic" in self.other_failures and not "panic" in older.other_failures: | if ("panic" in self.other_failures and not "panic" in older.other_failures): | def regressed_since(self, older): """Check if this build has regressed since another build.""" if "disk full" in self.other_failures: return False if "timeout" in self.other_failures and "timeout" in older.other_failures: # When the timeout happens exactly can differ slightly, so it's okay # if the numbers are a bit di... |
yield "<select name='author'>" for email in sorted(authors): yield "<option value='%s'>%s</option>" % (email, authors[email]) yield "</select>" | yield select(name="author", values=authors, default=author) | def render(self, myself, tree, author=None): t = self.buildfarm.trees[tree] interesting = list() authors = {"ALL": "ALL"} branch = t.get_branch() re_author = re.compile("^(.*) <(.*)>$") for entry in branch.log(limit=HISTORY_HORIZON): m = re_author.match(entry.author) authors[m.group(2)] = m.group(1) if author in ("ALL"... |
def main_menu(self): | def main_menu(self, tree, host, compiler): | def main_menu(self): """main page""" |
yield "<select name='host'>\n" for host in self.buildfarm.hostdb.hosts(): yield "<option value='%s'>%s -- %s</option>\n" % ( host.name, host.platform.encode("utf-8"), host.name) yield "</select>\n" yield "<select name='tree'>\n" for tree, t in self.buildfarm.trees.iteritems(): yield "<option value='%s'>%s:%s</option>\... | host_dict = {} for h in self.buildfarm.hostdb.hosts(): host_dict[h.name] = "%s -- %s" % (h.platform.encode("utf-8"), h.name) yield "".join(select("host", host_dict, default=host)) tree_dict = {} for t in self.buildfarm.trees.values(): tree_dict[t.name] = "%s:%s" % (t.name, t.branch) yield "".join(select("tree", tree_di... | def main_menu(self): """main page""" |
yield "".join(self.main_menu()) | tree = get_param(form, "tree") host = get_param(form, "host") compiler = get_param(form, "compiler") yield "".join(self.main_menu(tree, host, compiler)) | def __call__(self, environ, start_response): form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ) fn_name = get_param(form, 'function') or '' myself = wsgiref.util.application_uri(environ) |
tree = get_param(form, "tree") host = get_param(form, "host") compiler = get_param(form, "compiler") | def __call__(self, environ, start_response): form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ) fn_name = get_param(form, 'function') or '' myself = wsgiref.util.application_uri(environ) | |
tree = get_param(form, "tree") | def __call__(self, environ, start_response): form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ) fn_name = get_param(form, 'function') or '' myself = wsgiref.util.application_uri(environ) | |
authors = set(["ALL"]) | authors = {"ALL": "ALL"} | def render(self, myself, tree, author=None): t = self.buildfarm.trees[tree] interesting = list() authors = set(["ALL"]) branch = t.get_branch() for entry in branch.log(limit=HISTORY_HORIZON): authors.add(entry.author) if author in ("ALL", "", entry.author): interesting.append(entry) |
authors.add(entry.author) if author in ("ALL", "", entry.author): | m = re_author.match(entry.author) authors[m.group(2)] = m.group(1) if author in ("ALL", "", m.group(2)): | def render(self, myself, tree, author=None): t = self.buildfarm.trees[tree] interesting = list() authors = set(["ALL"]) branch = t.get_branch() for entry in branch.log(limit=HISTORY_HORIZON): authors.add(entry.author) if author in ("ALL", "", entry.author): interesting.append(entry) |
for name in sorted(authors): yield "<option>%s</option>" % name | for email in sorted(authors): yield "<option value='%s'>%s</option>" % (email, authors[email]) | def render(self, myself, tree, author=None): t = self.buildfarm.trees[tree] interesting = list() authors = set(["ALL"]) branch = t.get_branch() for entry in branch.log(limit=HISTORY_HORIZON): authors.add(entry.author) if author in ("ALL", "", entry.author): interesting.append(entry) |
return (self._get_by_checksum(build) is not None) | return not (self.store.find(StormBuild, Cast(StormBuild.checksum, "TEXT") == build.log_checksum()).is_empty()) | def __contains__(self, build): return (self._get_by_checksum(build) is not None) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.