summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/dump.py
diff options
context:
space:
mode:
authorThomas Roos <throos@amazon.de>2023-05-17 16:36:13 +0200
committerSteve Sakoman <steve@sakoman.com>2023-07-20 12:10:40 -1000
commit4f1eb64d154da11acf5835e0e72c9a5f5b9f7f3d (patch)
tree2e06034a5f88a9f5925cf2684dc16021af9a8fbf /meta/lib/oeqa/utils/dump.py
parent4c02657a44aa9a8fdc0a804793120f0018d8528a (diff)
downloadpoky-4f1eb64d154da11acf5835e0e72c9a5f5b9f7f3d.tar.gz
testimage/oeqa: Drop testimage_dump_host functionality
The intent behind these functions was to dump the system state when issues occured but it has never really worked as we'd planned. Regular monitoring as the build runs has largely replaced this as that allows a trend to be seen rather than a spot value which was never really useful. The code is bitrotting and not functioning correctly so drop it. [YOCTO #13872] RP: Reword commit message (From OE-Core rev: 8d1bc34cffdd9f054e51db4e880747c79bf834fe) Signed-off-by: Thomas Roos <throos@amazon.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit dea37ba49a236029da73d5cfbfc069bffc38b508) Signed-off-by: Steve Sakoman <steve@sakoman.com>
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