From: Michal Sojka Date: Thu, 3 Sep 2009 09:46:38 +0000 (+0200) Subject: Generate links kernel configs and test sources in table labels X-Git-Tag: fix-allnoconfig~354 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/commitdiff_plain/e3c421b65264340400edad6dbd9bab545796c044 Generate links kernel configs and test sources in table labels --- diff --git a/tests/genhtml.py b/tests/genhtml.py index 1302ad8..2c7aa8d 100755 --- a/tests/genhtml.py +++ b/tests/genhtml.py @@ -12,31 +12,41 @@ class Axis: self.type = atype self.values = dircache.listdir('by-%s'%atype) - def __str__(self): - if self.type == "kern": return "kernel" - elif self.type == "clck": return "CPU clock" - elif self.type == "test": return "test" - else: raise Exception, "Unknown type" - def __iter__(self): return iter(self.values) def __getitem__(self, key): return self.values[key] - def getLabel(self, v): - if self.type == "clck": return v+" MHz" - elif self.type == "test": return "%s"%(urllib.quote(v), v) - else: return v - - def labels(self): for v in self.values: yield self.getLabel(v) - -kernels = Axis('kern') -clocks = Axis('clck') -tests = Axis('test') + +class AxisKern(Axis): + def __init__(self): + Axis.__init__(self, 'kern') + def getLabel(self, v): + i=v.find(":") + if i>0: kver=v[:i] + else: kver=v + return v+"
config"%(urllib.quote(kver)) + + +class AxisClck(Axis): + def __init__(self): + Axis.__init__(self, 'clck') + def getLabel(self, v): + return v+" MHz" + +class AxisTest(Axis): + def __init__(self): + Axis.__init__(self, 'test') + def getLabel(self, v): + return v+"
source"%(urllib.quote(v)) + +kernels = AxisKern() +clocks = AxisClck() +tests = AxisTest() class PageSet: def __init__(self, values, x, y):