summaryrefslogtreecommitdiff
path: root/tko/parsers
diff options
context:
space:
mode:
authorjadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4>2009-03-10 04:21:03 +0000
committerjadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4>2009-03-10 04:21:03 +0000
commit579a7c10a70e7687b2e71f633033313ec82f9f8c (patch)
tree1c8e6f40299cfb967eb091935983f154cdc7ff0a /tko/parsers
parentaaf56639287f286cbfe3a66fca4b71457488fa0f (diff)
Add support to the autotest parser for updating RUNNING test results
with new reason values so long as tests write out multiple status messages. This would allow tests (particularly long-running ones) to record early success or failure information. Risk: Low Visibility: If tests write out multiple status messages, RUNNING records will grab their reasons. Otherwise, there should be no visible change. Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@2861 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'tko/parsers')
-rw-r--r--tko/parsers/version_1.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tko/parsers/version_1.py b/tko/parsers/version_1.py
index 1d223915..58cc42ff 100644
--- a/tko/parsers/version_1.py
+++ b/tko/parsers/version_1.py
@@ -179,6 +179,7 @@ class parser(base.parser):
started_time_stack = [None]
subdir_stack = [None]
running_test = None
+ running_reasons = []
yield [] # we're ready to start running
# create a RUNNING SERVER_JOB entry to represent the entire test
@@ -257,6 +258,9 @@ class parser(base.parser):
min_stack_size = stack.size()
elif stack.size() == min_stack_size + 1 and not running_test:
# we just started a new test, insert a running record
+ running_reasons = []
+ if line.reason:
+ running_reasons.append(line.reason)
running_test = test.parse_partial_test(self.job,
line.subdir,
line.testname,
@@ -286,6 +290,13 @@ class parser(base.parser):
current_status):
if line.reason:
current_reason = line.reason
+ # update the status of a currently running test
+ if running_test:
+ running_reasons.append(line.reason)
+ running_test.reason = ", ".join(running_reasons)
+ new_tests.append(running_test)
+ msg = "update RUNNING reason: %s" % line.reason
+ tko_utils.dprint(msg)
current_status = stack.current_status()
started_time = None
finished_time = line.get_timestamp()