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

df.py: Add feature check for read-only-rootfs

If the target is using a read-only rootfs, the available space on '/'
will be zero. This will cause the test to incorrectly fail and skipping
seems appropriate in this case.

(From OE-Core rev: af1dbea3c9b9b42a3e6803b231e425423d70e210)

Signed-off-by: Wes Lindauer <wesley.lindauer@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Wes Lindauer
2021-02-18 01:20:55 -05:00
committed by Richard Purdie
parent 39c90869ab
commit b20dd9b0a3
+2
View File
@@ -4,12 +4,14 @@
from oeqa.runtime.case import OERuntimeTestCase from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends from oeqa.core.decorator.depends import OETestDepends
from oeqa.core.decorator.data import skipIfDataVar, skipIfInDataVar
from oeqa.runtime.decorator.package import OEHasPackage from oeqa.runtime.decorator.package import OEHasPackage
class DfTest(OERuntimeTestCase): class DfTest(OERuntimeTestCase):
@OETestDepends(['ssh.SSHTest.test_ssh']) @OETestDepends(['ssh.SSHTest.test_ssh'])
@OEHasPackage(['coreutils', 'busybox']) @OEHasPackage(['coreutils', 'busybox'])
@skipIfInDataVar('IMAGE_FEATURES', 'read-only-rootfs', 'Test case df requires a writable rootfs')
def test_df(self): def test_df(self):
cmd = "df -P / | sed -n '2p' | awk '{print $4}'" cmd = "df -P / | sed -n '2p' | awk '{print $4}'"
(status,output) = self.target.run(cmd) (status,output) = self.target.run(cmd)