[Branch,~linaro-validation/lava-test/trunk] Rev 105: Update parse function using in LTP test suite to fix 900694

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

Commit Message

Spring Zhang Dec. 9, 2011, 8:32 a.m.
Merge authors:
  Spring Zhang (qzhang)
Related merge proposals:
  https://code.launchpad.net/~qzhang/lava-test/fix-900694/+merge/84709
  proposed by: Spring Zhang (qzhang)
  review: Approve - Le Chi Thu (le-chi-thu)
  review: Resubmit - Spring Zhang (qzhang)
------------------------------------------------------------
revno: 105 [merge]
committer: Spring Zhang <spring.zhang@linaro.org>
branch nick: fix-900694
timestamp: Fri 2011-12-09 16:29:45 +0800
message:
  Update parse function using in LTP test suite to fix 900694
modified:
  lava_test/test_definitions/ltp.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

Patch

=== modified file 'lava_test/test_definitions/ltp.py'
--- lava_test/test_definitions/ltp.py	2011-10-20 12:12:15 +0000
+++ lava_test/test_definitions/ltp.py	2011-12-08 03:21:11 +0000
@@ -51,8 +51,9 @@ 
 
 
 class LTPParser(TestParser):
-    def parse(self):
-        filename = "testoutput.log"
+    def parse(self, artifacts):
+        filename = artifacts.stdout_pathname
+        print "filename=%s" %filename
         pat = re.compile(self.pattern)
         with open(filename, 'r') as fd:
             for line in fd.readlines():
@@ -65,12 +66,8 @@ 
                     if subid == '0':
                         continue
                     results['test_case_id'] += "." + subid
-                    self.results['test_results'].append(results)
-        if self.fixupdict:
-            self.fixresults(self.fixupdict)
-        if self.appendall:
-            self.appendtoall(self.appendall)
-        self.fixids()
+                    self.results['test_results'].append(
+                        self.analyze_test_result(results))
 
 
 ltpinst = TestInstaller(INSTALLSTEPS, deps=DEPS, url=URL,