X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blobdiff_plain/a4f1acf5c305023aa6364005c1bd585c39f8ad4d..4d7bc1b66f5503555723900af14730aa1a9102c5:/gw-tests/genhtml/genhtml.py diff --git a/gw-tests/genhtml/genhtml.py b/gw-tests/genhtml/genhtml.py index de02878..1990302 100755 --- a/gw-tests/genhtml/genhtml.py +++ b/gw-tests/genhtml/genhtml.py @@ -5,6 +5,7 @@ import dircache; import sys; import urllib import traceback +import glob class DimValue(object): def __new__(cls, dim, value): @@ -22,6 +23,8 @@ class DimValue(object): return "DimValue(%s, %s)" % (repr(self.dim), repr(self.value)) def htmlTableHeading(self): return self.dim.htmlTableHeading(self.value) + def index(self): + return self.dim.sortedKeys.index(self.value) class DimValues(list): def replace(self, val): @@ -142,14 +145,42 @@ class Test(object): self.values = values self.tests = tests def printThumbLink(self, file): - thumb = self.path+'/thumb' - try: - imgs = [img for img in dircache.listdir(thumb)] - except OSError: - imgs = [ self.name + ".png" ] +# try: +# imgs = [img for img in dircache.listdir(thumb)] +# except OSError: +# imgs = [ self.name + ".png" ] + imgs = [ 'tgraph.png' ] for img in imgs: - print >>file, "" % \ + print >>file, "" % \ (urllib.quote(self.path), urllib.quote(self.path), img) + def fullImgLink(self, pngName): + if os.environ['NO_PDF']: + return "
" % pngName + else: + return "" % \ + (pngName[:-4]+".pdf", pngName) + + def htmlPrintStats(self, html): + cwd = os.getcwd() + os.chdir(self.path) + stats = glob.glob("*-stat.txt") + print >>html, "%s%s | " % (i, "