From 2724a7c9354ef80599e91695f11dc77e0cd89269 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 20 Dec 2020 15:58:47 +0000 Subject: 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 --- meta/lib/oeqa/utils/commands.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'meta/lib') 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 -- cgit v1.2.3-54-g00ecf