1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-02 01:19:52 +00:00

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: 8d7f1c1574ceaff11966331855491ef7c96fd110)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 40bcae01b0be2f293dea9ab42c6b7f8f47827cf5)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2020-12-20 15:58:47 +00:00
parent b2990440f2
commit 3c451a8437
+3
View File
@@ -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