=== modified file 'doc/changes.rst'
@@ -16,6 +16,7 @@
* Enabled URL cache used by the ``lava-test register`` command.
* Add command line switch ``--verbose`` that turns on lots of messages
* Add new GLMark2 ES2 test (glmark2-es2)
+ * Add new render-bench test
.. _version_0_4:
=== added file 'lava_test/test_definitions/render-bench.py'
@@ -0,0 +1,33 @@
+import re
+import abrek.testdef
+
+class RenderBenchParser(abrek.testdef.AbrekTestParser):
+ def parse(self):
+ PAT1 = "^Test: (?P<test_case_id>.*)"
+ PAT2 = "^Time: (?P<measurement>\d+\.\d+)"
+ filename = "testoutput.log"
+ pat1 = re.compile(PAT1)
+ pat2 = re.compile(PAT2)
+ cur_test = None
+ with open(filename, 'r') as fd:
+ for line in fd:
+ match = pat1.search(line)
+ if match:
+ cur_test = match.groupdict()['test_case_id']
+ else:
+ match = pat2.search(line)
+ if match:
+ d = match.groupdict()
+ d['test_case_id'] = cur_test
+ self.results['test_results'].append(d)
+
+ self.appendtoall({'units':'seconds', 'result':'pass'})
+
+RUNSTEPS = ["render_bench"]
+
+inst = abrek.testdef.AbrekTestInstaller(deps=["render-bench"])
+run = abrek.testdef.AbrekTestRunner(RUNSTEPS)
+parse = RenderBenchParser()
+
+testobj = abrek.testdef.AbrekTest(testname="render-bench", installer=inst,
+ runner=run, parser=parse)