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-02 23:47:21 +0100
commit4770a766389b94ddd5639d7a92e196abac38da22 (patch)
tree01db69a1a1db5307c0c93a5b60960db8a1d8b779 /meta/lib/oeqa/utils/dump.py
parentf8c7542164ebbe29613532c93ddc34c94238453c (diff)
downloadopenembedded-core-contrib-4770a766389b94ddd5639d7a92e196abac38da22.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] 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):
class BaseDumper(object):
+ """ Base class to dump commands from host/target """
def __init__(self, cmds, parent_dir):
self.cmds = []
@@ -53,6 +54,7 @@ class BaseDumper(object):
class HostDumper(BaseDumper):
+ """ Class to get dumps from the host running the tests """
def __init__(self, cmds, parent_dir):
super(HostDumper, self).__init__(cmds, parent_dir)
@@ -66,6 +68,7 @@ class HostDumper(BaseDumper):
class TargetDumper(BaseDumper):
+ """ Class to get dumps from target, it only works with QemuRunner """
def __init__(self, cmds, parent_dir, qemurunner):
super(TargetDumper, self).__init__(cmds, parent_dir)
@@ -75,5 +78,10 @@ class TargetDumper(BaseDumper):
if dump_dir:
self.dump_dir = dump_dir
for cmd in self.cmds:
- (status, output) = self.runner.run_serial(cmd)
- self._write_dump(cmd.split()[0], output)
+ # We can continue with the testing if serial commands fail
+ try:
+ (status, output) = self.runner.run_serial(cmd)
+ self._write_dump(cmd.split()[0], output)
+ except:
+ print("Tried to dump info from target but "
+ "serial console failed")