result = self._get_store().find(StormBuild)
return distinct_builds(result.order_by(Desc(StormBuild.upload_time)))
+ def get_summary_builds(self):
+ store = self._get_store()
+ return store.execute("SELECT tree,status FROM build GROUP BY tree,host,compiler having max(age);")
+
def get_tree_builds(self, tree):
result = self._get_store().find(StormBuild,
Cast(StormBuild.tree, "TEXT") == Cast(tree, "TEXT"))
os.link(build.basename+".log", new_basename+".log")
if os.path.exists(build.basename+".err"):
os.link(build.basename+".err", new_basename+".err")
- new_build = StormBuild(new_basename, build.tree, build.host,
- build.compiler, rev)
+ #they are supposed to be in unicode only but since comparision for sumary page depends on them the unicode conversion is done to avoid duplicates when running query in summary_builds
+ new_build = StormBuild(new_basename, unicode(build.tree), unicode(build.host), unicode(build.compiler), rev)
new_build.checksum = build.log_checksum()
new_build.upload_time = build.upload_time
new_build.status_str = build.status().__serialize__()
LogFileMissing,
NoSuchBuildError,
NoTestOutput,
+ BuildStatus,
)
import cgi
# output when we want
broken_table = ""
- builds = self.buildfarm.get_last_builds()
+ builds = self.buildfarm.get_summary_builds()
for build in builds:
- host_count[build.tree]+=1
- status = build.status()
+ host_count[build[0]]+=1
+ status = BuildStatus.__deserialize__(build[1])
if status.failed:
- broken_count[build.tree]+=1
+ broken_count[build[0]]+=1
if "panic" in status.other_failures:
- panic_count[build.tree]+=1
+ panic_count[build[0]]+=1
return (host_count, broken_count, panic_count)
def render_text(self, myself):