summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/dump.py
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2015-09-02 13:44:42 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-03 12:43:31 +0100
commit097f36f636a624a9cf3f04780000671d7bc3df50 (patch)
treed4430fffec0d02d39a2cb295b3fef92fd6b679f2 /meta/lib/oeqa/utils/dump.py
parenta3fec07654e6992eab96861892d4261b1e2e0ebf (diff)
downloadpoky-097f36f636a624a9cf3f04780000671d7bc3df50.tar.gz
qemurunner: Handle lack of data on run serial gracefully
This changes the behavior when data was not received over the serial console when a command is run. With this the socket is no longer closed but it throws and exception that can handled in upper layers. With this the test can continue without throwing errors for not having the socket anymore. [YOCTO #8118] (From OE-Core rev: 4770a766389b94ddd5639d7a92e196abac38da22) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils/dump.py')
-rw-r--r--meta/lib/oeqa/utils/dump.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/dump.py b/meta/lib/oeqa/utils/dump.py
index 6067438e35..4ae871c657 100644
--- a/meta/lib/oeqa/utils/dump.py
+++ b/meta/lib/oeqa/utils/dump.py
@@ -12,6 +12,7 @@ def get_host_dumper(d):
12 12
13 13
14class BaseDumper(object): 14class BaseDumper(object):
15 """ Base class to dump commands from host/target """
15 16
16 def __init__(self, cmds, parent_dir): 17 def __init__(self, cmds, parent_dir):
17 self.cmds = [] 18 self.cmds = []
@@ -53,6 +54,7 @@ class BaseDumper(object):
53 54
54 55
55class HostDumper(BaseDumper): 56class HostDumper(BaseDumper):
57 """ Class to get dumps from the host running the tests """
56 58
57 def __init__(self, cmds, parent_dir): 59 def __init__(self, cmds, parent_dir):
58 super(HostDumper, self).__init__(cmds, parent_dir) 60 super(HostDumper, self).__init__(cmds, parent_dir)
@@ -66,6 +68,7 @@ class HostDumper(BaseDumper):
66 68
67 69
68class TargetDumper(BaseDumper): 70class TargetDumper(BaseDumper):
71 """ Class to get dumps from target, it only works with QemuRunner """
69 72
70 def __init__(self, cmds, parent_dir, qemurunner): 73 def __init__(self, cmds, parent_dir, qemurunner):
71 super(TargetDumper, self).__init__(cmds, parent_dir) 74 super(TargetDumper, self).__init__(cmds, parent_dir)
@@ -75,5 +78,10 @@ class TargetDumper(BaseDumper):
75 if dump_dir: 78 if dump_dir:
76 self.dump_dir = dump_dir 79 self.dump_dir = dump_dir
77 for cmd in self.cmds: 80 for cmd in self.cmds:
78 (status, output) = self.runner.run_serial(cmd) 81 # We can continue with the testing if serial commands fail
79 self._write_dump(cmd.split()[0], output) 82 try:
83 (status, output) = self.runner.run_serial(cmd)
84 self._write_dump(cmd.split()[0], output)
85 except:
86 print("Tried to dump info from target but "
87 "serial console failed")