summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2019-12-09 23:59:05 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-15 09:10:46 +0000
commitf0f8714238d3d9d293a80c9e4ecb759e7483dc51 (patch)
treee703b82a2dad15769a6f44b74fce54b933866f9b /meta/lib/oeqa
parent746d5b3bfddf81af8747e97a056b6ac582a9d991 (diff)
downloadpoky-f0f8714238d3d9d293a80c9e4ecb759e7483dc51.tar.gz
oeqa: qemu: ensure that host dump commands can be run properly
If runqemu fails, there is some logic to run a set of commands to dump various bits of information that might help debug the issue (particularly in a busy situation such as on the autobuilder). However, when we try to run these we are inside the normal build environment which restricts commands to be run on the host to those specified in HOSTTOOLS. Since this isn't a place where host contamination is going to be a problem, override PATH to a reasonable default so that we run the actual host tools directly to avoid the issue. (Logically we would want to use the original PATH value here, but it is not easily accessible.) (From OE-Core rev: 3f6dcf67bccb4f0fc1a9a64e02bd0e2da620ad0e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/utils/dump.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/dump.py b/meta/lib/oeqa/utils/dump.py
index d34e05e2b4..6594e286a4 100644
--- a/meta/lib/oeqa/utils/dump.py
+++ b/meta/lib/oeqa/utils/dump.py
@@ -71,8 +71,10 @@ class HostDumper(BaseDumper):
71 def dump_host(self, dump_dir=""): 71 def dump_host(self, dump_dir=""):
72 if dump_dir: 72 if dump_dir:
73 self.dump_dir = dump_dir 73 self.dump_dir = dump_dir
74 env = os.environ.copy()
75 env['PATH'] = '/usr/sbin:/sbin:/usr/bin:/bin'
74 for cmd in self.cmds: 76 for cmd in self.cmds:
75 result = runCmd(cmd, ignore_status=True) 77 result = runCmd(cmd, ignore_status=True, env=env)
76 self._write_dump(cmd.split()[0], result.output) 78 self._write_dump(cmd.split()[0], result.output)
77 79
78class TargetDumper(BaseDumper): 80class TargetDumper(BaseDumper):