diff mbox

[Branch,~linaro-validation/lava-test/trunk] Rev 131: Add render-bench test definition.

Message ID 20120312075015.10967.74906.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Zygmunt Krynicki March 12, 2012, 7:50 a.m. UTC
Merge authors:
  Alexandros Frantzis (afrantzis)
Related merge proposals:
  https://code.launchpad.net/~afrantzis/lava-test/render-bench/+merge/37247
  proposed by: Alexandros Frantzis (afrantzis)
  review: Approve - Zygmunt Krynicki (zkrynicki)
------------------------------------------------------------
revno: 131 [merge]
committer: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
branch nick: trunk
timestamp: Mon 2012-03-12 08:48:46 +0100
message:
  Add render-bench test definition.
added:
  lava_test/test_definitions/render-bench.py
modified:
  doc/changes.rst


--
lp:lava-test
https://code.launchpad.net/~linaro-validation/lava-test/trunk

You are subscribed to branch lp:lava-test.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-test/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'doc/changes.rst'
--- doc/changes.rst	2012-03-12 07:46:13 +0000
+++ doc/changes.rst	2012-03-12 07:48:46 +0000
@@ -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'
--- lava_test/test_definitions/render-bench.py	1970-01-01 00:00:00 +0000
+++ lava_test/test_definitions/render-bench.py	2010-10-01 13:09:45 +0000
@@ -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)