diff mbox

[Branch,~linaro-validation/lava-test/trunk] Rev 104: fix a bug with tiobench

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

Commit Message

Paul Larson Oct. 20, 2011, 9:26 p.m. UTC
Merge authors:
  Le Chi Thu le.chi.thu@linaro.org <le.chi.thu@linaro.org>
Related merge proposals:
  https://code.launchpad.net/~le-chi-thu/lava-test/override-test-options/+merge/80002
  proposed by: Le Chi Thu (le-chi-thu)
  review: Approve - Paul Larson (pwlars)
------------------------------------------------------------
revno: 104 [merge]
tags: release-0.3.1, 2011.10
committer: Paul Larson <paul.larson@canonical.com>
branch nick: lava-test
timestamp: Thu 2011-10-20 16:23:47 -0500
message:
  fix a bug with tiobench
modified:
  lava_test/test_definitions/tiobench.py


--
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 'lava_test/test_definitions/tiobench.py'
--- lava_test/test_definitions/tiobench.py	2011-10-20 12:12:15 +0000
+++ lava_test/test_definitions/tiobench.py	2011-10-20 18:45:45 +0000
@@ -39,7 +39,7 @@ 
 
 
 class TIObenchTestParser(TestParser):
-    def parse(self):
+    def parse(self, artifacts):
         # Pattern to match the test case name
         pattern1="(?P<test_id>^(Sequential|Random) (Writes|Reads))"
         # Pattern to match the parameter details and measurement
@@ -50,7 +50,7 @@ 
         pat2 = re.compile(pattern2)
         tc_id = None
         with open(filename) as fd:
-            for line in fd:
+            for lineno, line in enumerate(fd, 1):
                 match1 = pat1.match(line)
                 match2 = pat2.search(line)
                 if match1:
@@ -62,11 +62,10 @@ 
                     results['test_case_id'] = (
                         '%s_%sMBfilesize_%sbytesblksize') % (
                             tc_id, filesize, blks_size)
-                    self.results['test_results'].append(results)
-
-        if self.appendall:
-            self.appendtoall(self.appendall)
-        self.fixmeasurements()
+                    results["log_filename"] = "testoutput.log"
+                    results["log_lineno"] = lineno
+                    self.results['test_results'].append(
+                        self.analyze_test_result(results))
 
 tiobench_inst = TestInstaller(INSTALLSTEPS, url=URL,
     md5=MD5)