summaryrefslogtreecommitdiffstats
path: root/meta/lib
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:57 +0000
commit2724a7c9354ef80599e91695f11dc77e0cd89269 (patch)
tree9b146b24e443eac36e09cef32d95c1b731b1dc88 /meta/lib
parent36422d0641aab1ba93b1b82963e4f96e331ef1b4 (diff)
downloadpoky-2724a7c9354ef80599e91695f11dc77e0cd89269.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. (From OE-Core rev: 40bcae01b0be2f293dea9ab42c6b7f8f47827cf5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-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
188 # call sync around the tests to ensure the IO queue doesn't get too large, taking any IO 188 # call sync around the tests to ensure the IO queue doesn't get too large, taking any IO
189 # hit here rather than in bitbake shutdown. 189 # hit here rather than in bitbake shutdown.
190 if sync: 190 if sync:
191 p = os.environ['PATH']
192 os.environ['PATH'] = "/usr/bin:/bin:/usr/sbin:/sbin:" + p
191 os.system("sync") 193 os.system("sync")
194 os.environ['PATH'] = p
192 195
193 result.command = command 196 result.command = command
194 result.status = cmd.status 197 result.status = cmd.status