[Branch,~linaro-validation/lava-test/trunk] Rev 130: Add test definition for the glmark2-es2 benchmark.

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

Commit Message

Zygmunt Krynicki March 12, 2012, 7:48 a.m.
Merge authors:
  Alexandros Frantzis (afrantzis)
Related merge proposals:
  https://code.launchpad.net/~afrantzis/lava-test/glmark2-es2/+merge/37244
  proposed by: Alexandros Frantzis (afrantzis)
  review: Approve - Zygmunt Krynicki (zkrynicki)
------------------------------------------------------------
revno: 130 [merge]
committer: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
branch nick: trunk
timestamp: Mon 2012-03-12 08:46:13 +0100
message:
  Add test definition for the glmark2-es2 benchmark.
added:
  lava_test/test_definitions/glmark2-es2.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

Patch

=== modified file 'doc/changes.rst'
--- doc/changes.rst	2012-03-10 13:21:53 +0000
+++ doc/changes.rst	2012-03-12 07:46:13 +0000
@@ -15,6 +15,7 @@ 
    lsb_release modules are not visible to python.
  * 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)
 
 .. _version_0_4:
 

=== added file 'lava_test/test_definitions/glmark2-es2.py'
--- lava_test/test_definitions/glmark2-es2.py	1970-01-01 00:00:00 +0000
+++ lava_test/test_definitions/glmark2-es2.py	2010-10-01 12:44:34 +0000
@@ -0,0 +1,40 @@ 
+import re
+import abrek.testdef
+
+RUNSTEPS = ["glmark2-es2"]
+
+class Glmark2Parser(abrek.testdef.AbrekTestParser):
+    def parse(self):
+        PAT1 = "^\W+(?P<subtest>.*?)\W+FPS:\W+(?P<measurement>\d+)"
+        filename = "testoutput.log"
+        pat1 = re.compile(PAT1)
+        in_results = False
+        cur_test = ""
+        with open(filename, 'r') as fd:
+            for line in fd.readlines():
+                if line.find("Precompilation") != -1:
+                    in_results = True
+                if in_results == True:
+                    match = pat1.search(line)
+                    if match:
+                        d = match.groupdict()
+                        d['test_case_id'] = "%s.%s" % (cur_test, d['subtest'])
+                        d.pop('subtest')
+                        self.results['test_results'].append(d)
+                    else:
+                        if line.startswith("==="):
+                            in_results = False
+                        else:
+                            cur_test = line.strip()
+
+        if self.fixupdict:
+            self.fixresults(self.fixupdict)
+        if self.appendall:
+            self.appendtoall(self.appendall)
+
+parse = Glmark2Parser(appendall={'units':'fps', 'result':'pass'})
+inst = abrek.testdef.AbrekTestInstaller(deps=["glmark2-es2"])
+run = abrek.testdef.AbrekTestRunner(RUNSTEPS)
+
+testobj = abrek.testdef.AbrekTest(testname="glmark2-es2", installer=inst,
+                                  runner=run, parser=parse)