summaryrefslogtreecommitdiff
path: root/tko/parsers
diff options
context:
space:
mode:
authorjadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4>2009-01-30 15:07:05 +0000
committerjadmanski <jadmanski@592f7852-d20e-0410-864c-8624ca9c26a4>2009-01-30 15:07:05 +0000
commitdf43b951d57a921665e174b22d86e834d6cd4494 (patch)
tree5f96e8172b7ed5472a83631eb1519de21317b637 /tko/parsers
parent25fa09cb23ad198f33f6f450ff1c7c5bbb761e24 (diff)
Add some more slack to the parser when dealing with multi-machine
jobs. If the job isn't neatly broken down into machine-specific subjobs, just accept it and use the set of hostnames as the "hostname". This should allow us to do meaningful parsing of multi-machine test results, even if things aren't as intelligent as we'd like. Risk: Low Visibility: Doesn't affect the parsing of anything that the parser can currently handle; allows us to do SOME parsing of generic multi-machine results. Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@2720 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'tko/parsers')
-rw-r--r--tko/parsers/version_0.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tko/parsers/version_0.py b/tko/parsers/version_0.py
index 5443d6bf..229ab9f3 100644
--- a/tko/parsers/version_0.py
+++ b/tko/parsers/version_0.py
@@ -5,6 +5,10 @@ from autotest_lib.tko import utils as tko_utils, models, status_lib
from autotest_lib.tko.parsers import base
+class NoHostnameError(Exception):
+ pass
+
+
class job(models.job):
def __init__(self, dir):
job_dict = job.load_from_dir(dir)
@@ -20,7 +24,10 @@ class job(models.job):
label = keyval.get("label", None)
machine = keyval.get("hostname", None)
if machine and "," in machine:
- machine = job.find_hostname(dir) # find a unique hostname
+ try:
+ machine = job.find_hostname(dir) # find a unique hostname
+ except NoHostnameError:
+ pass # just use the comma-separated name
queued_time = tko_utils.get_timestamp(keyval, "job_queued")
started_time = tko_utils.get_timestamp(keyval, "job_started")
finished_time = tko_utils.get_timestamp(keyval, "job_finished")
@@ -55,7 +62,7 @@ class job(models.job):
tko_utils.dprint("Could not read a hostname from "
"sysinfo/uname_-a")
- raise Exception("Unable to find a machine name")
+ raise NoHostnameError("Unable to find a machine name")
class kernel(models.kernel):