df.py: Add feature check for read-only-rootfs
PATCH 1/1 df.py: Add feature check for read-only-rootfs
From: Wes Lindauer <[email protected]>
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.
Signed-off-by Wes Lindauer <[email protected]>
--- meta/lib/oeqa/runtime/cases/df.py | 2 ++ 1 file changed, 2 insertions(+)
meta/lib/oeqa/runtime/cases/df.py +2 -0
@@ -4,12 +4,14 @@ from oeqa.runtime.case import OERuntimeTestCase from oeqa.core.decorator.depends import OETestDepends +from oeqa.core.decorator.data import skipIfDataVar, skipIfInDataVar from oeqa.runtime.decorator.package import OEHasPackage class DfTest(OERuntimeTestCase): @OETestDepends(['ssh.SSHTest.test_ssh']) @OEHasPackage(['coreutils', 'busybox']) + @skipIfInDataVar('IMAGE_FEATURES', 'read-only-rootfs', 'Test case df requires a writable rootfs') def test_df(self): cmd = "df -P / | sed -n '2p' | awk '{print $4}'" (status,output) = self.target.run(cmd)
Signature · 1 line
2.21.3