]> code.ossystems Code Review - openembedded-core.git/commitdiff
df.py: Add feature check for read-only-rootfs
authorWes Lindauer <wesley.lindauer@gmail.com>
Thu, 18 Feb 2021 06:20:55 +0000 (01:20 -0500)
committerSteve Sakoman <steve@sakoman.com>
Thu, 4 Mar 2021 14:19:49 +0000 (04:19 -1000)
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 <wesley.lindauer@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit af1dbea3c9b9b42a3e6803b231e425423d70e210)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/lib/oeqa/runtime/cases/df.py

index 89fd0fb901a8c9d75a678c18f48836663d28012b..bb155c9cf98c1d73760bbfa699fc4ad39e2cf0aa 100644 (file)
@@ -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)