]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
oeqa/lib/utils/postactions: fix host disk usage stats retrieval
authorAlexis Lothoré <alexis.lothore@bootlin.com>
Wed, 28 Feb 2024 16:41:35 +0000 (17:41 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 29 Feb 2024 10:25:12 +0000 (10:25 +0000)
commitda7cc5def2839a0e15d07244f858847479c12caa
tree5f5c61b7b029ea55b866a7d5137a011fd9ceb71d
parent83dad4a93ff81c6c1e048443e0827d825670158b
oeqa/lib/utils/postactions: fix host disk usage stats retrieval

The recently introduced postactions module  can raise, on failing ptests,
the following warning:

WARNING: core-image-ptest-glib-2.0-1.0-r0 do_testimage: Can not get host
disk usage: [Errno 2] No such file or directory: '/usr/bin/df'

The issue is likely not happening because of df absence (to be confirmed
amongst the variety of workers) but because of the wrong path. Fix it by
letting subprocess search for df, passing only the binary name. To make it
work, we also have to reset the environment, otherwise the environment
configured before running bitbake will be used, and search will fail.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/postactions.py