X-Git-Url: http://rtime.felk.cvut.cz/gitweb/omk.git/blobdiff_plain/9080379202e60755224be96fdd3aa59432a2e7f2..45996dec1b0b7712238f4c5b2f5a048b6072c08c:/tests/tester.py diff --git a/tests/tester.py b/tests/tester.py index 5ab454e..bd84969 100755 --- a/tests/tester.py +++ b/tests/tester.py @@ -10,7 +10,12 @@ import time from xml.sax.saxutils import escape import fnmatch -sys.path.append("..") +invokeDir = os.getcwd(); +testsRoot = os.path.dirname(os.path.abspath(__file__)) +if not os.path.exists(os.path.join(testsRoot, "tester.py")): raise "Can't find tests root directory!" +os.environ['OMK_TESTSROOT'] = testsRoot + +sys.path.append(os.path.join(testsRoot, "..")) import rulesdef class Results(dict): @@ -18,6 +23,10 @@ class Results(dict): self.time = time.gmtime() self.datetime = time.strftime("%Y-%m-%d %H:%M:%S +0000", self.time) self.filename = "results-"+time.strftime("%Y%m%d-%H%M%S", self.time)+".html" + self.stats = None + + def genStats(self): + self.stats = Stats(self) def toHtml(self): s=""" @@ -31,13 +40,18 @@ class Results(dict):