summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/dump.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/utils/dump.py')
-rw-r--r--meta/lib/oeqa/utils/dump.py20
1 files changed, 1 insertions, 19 deletions
diff --git a/meta/lib/oeqa/utils/dump.py b/meta/lib/oeqa/utils/dump.py
index d420b497f9..d4d271369f 100644
--- a/meta/lib/oeqa/utils/dump.py
+++ b/meta/lib/oeqa/utils/dump.py
@@ -51,9 +51,7 @@ class BaseDumper(object):
51 self.dump_dir = dump_dir 51 self.dump_dir = dump_dir
52 52
53 def _construct_filename(self, command): 53 def _construct_filename(self, command):
54 if isinstance(self, HostDumper): 54 if isinstance(self, TargetDumper):
55 prefix = "host"
56 elif isinstance(self, TargetDumper):
57 prefix = "target" 55 prefix = "target"
58 elif isinstance(self, MonitorDumper): 56 elif isinstance(self, MonitorDumper):
59 prefix = "qmp" 57 prefix = "qmp"
@@ -76,22 +74,6 @@ class BaseDumper(object):
76 with open(fullname, 'w') as dump_file: 74 with open(fullname, 'w') as dump_file:
77 dump_file.write(output) 75 dump_file.write(output)
78 76
79class HostDumper(BaseDumper):
80 """ Class to get dumps from the host running the tests """
81
82 def __init__(self, cmds, parent_dir):
83 super(HostDumper, self).__init__(cmds, parent_dir)
84
85 def dump_host(self, dump_dir=""):
86 if dump_dir:
87 self.dump_dir = dump_dir
88 env = os.environ.copy()
89 env['PATH'] = '/usr/sbin:/sbin:/usr/bin:/bin'
90 env['COLUMNS'] = '9999'
91 for cmd in self.cmds:
92 result = runCmd(cmd, ignore_status=True, env=env)
93 self._write_dump(cmd.split()[0], result.output)
94
95class TargetDumper(BaseDumper): 77class TargetDumper(BaseDumper):
96 """ Class to get dumps from target, it only works with QemuRunner. 78 """ Class to get dumps from target, it only works with QemuRunner.
97 Will give up permanently after 5 errors from running commands over 79 Will give up permanently after 5 errors from running commands over