summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-12-20 15:58:47 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-12-21 22:29:08 +0000
commit40bcae01b0be2f293dea9ab42c6b7f8f47827cf5 (patch)
treeea6e22fdc5ec9119c24da5a648d8d1b1a8a4b6a1 /meta/lib/oeqa
parentcb5e96e05930eaff4d679166416d6c84d6e3236b (diff)
downloadopenembedded-core-contrib-40bcae01b0be2f293dea9ab42c6b7f8f47827cf5.tar.gz
oeqa/commands: Ensure sync can be found regardless of PATH
Avoid command not found errors shown in selftest logs due to changes to PATH settings which also risks intermittent problems due to IO load. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/utils/commands.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 6c1535ddfb..a71c16ab14 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -188,7 +188,10 @@ def runCmd(command, ignore_status=False, timeout=None, assert_error=True, sync=T
# call sync around the tests to ensure the IO queue doesn't get too large, taking any IO
# hit here rather than in bitbake shutdown.
if sync:
+ p = os.environ['PATH']
+ os.environ['PATH'] = "/usr/bin:/bin:/usr/sbin:/sbin:" + p
os.system("sync")
+ os.environ['PATH'] = p
result.command = command
result.status = cmd.status