From c6227ebb9a4c67f813176d1a2d8a8a0d7ff1fa19 Mon Sep 17 00:00:00 2001 From: Wes Lindauer Date: Thu, 18 Feb 2021 01:20:55 -0500 Subject: 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: 69c8987da199933554a9dd0eda0a045a4534bfab) Signed-off-by: Wes Lindauer Signed-off-by: Richard Purdie (cherry picked from commit af1dbea3c9b9b42a3e6803b231e425423d70e210) Signed-off-by: Steve Sakoman Signed-off-by: Richard Purdie --- meta/lib/oeqa/runtime/cases/df.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'meta') diff --git a/meta/lib/oeqa/runtime/cases/df.py b/meta/lib/oeqa/runtime/cases/df.py index 89fd0fb901..bb155c9cf9 100644 --- a/meta/lib/oeqa/runtime/cases/df.py +++ b/meta/lib/oeqa/runtime/cases/df.py @@ -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) -- cgit v1.2.3-54-g00ecf