summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorWes Lindauer <wesley.lindauer@gmail.com>2021-02-18 01:20:55 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-04 17:39:10 +0000
commitc6227ebb9a4c67f813176d1a2d8a8a0d7ff1fa19 (patch)
treecb4a4750c023bb52320d54abcadb2d62ee1ff79c /meta
parentca5de99799f2f3bc28dc8d22966f7d2757483766 (diff)
downloadpoky-c6227ebb9a4c67f813176d1a2d8a8a0d7ff1fa19.tar.gz
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 <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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/runtime/cases/df.py2
1 files changed, 2 insertions, 0 deletions
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 @@
4 4
5from oeqa.runtime.case import OERuntimeTestCase 5from oeqa.runtime.case import OERuntimeTestCase
6from oeqa.core.decorator.depends import OETestDepends 6from oeqa.core.decorator.depends import OETestDepends
7from oeqa.core.decorator.data import skipIfDataVar, skipIfInDataVar
7from oeqa.runtime.decorator.package import OEHasPackage 8from oeqa.runtime.decorator.package import OEHasPackage
8 9
9class DfTest(OERuntimeTestCase): 10class DfTest(OERuntimeTestCase):
10 11
11 @OETestDepends(['ssh.SSHTest.test_ssh']) 12 @OETestDepends(['ssh.SSHTest.test_ssh'])
12 @OEHasPackage(['coreutils', 'busybox']) 13 @OEHasPackage(['coreutils', 'busybox'])
14 @skipIfInDataVar('IMAGE_FEATURES', 'read-only-rootfs', 'Test case df requires a writable rootfs')
13 def test_df(self): 15 def test_df(self):
14 cmd = "df -P / | sed -n '2p' | awk '{print $4}'" 16 cmd = "df -P / | sed -n '2p' | awk '{print $4}'"
15 (status,output) = self.target.run(cmd) 17 (status,output) = self.target.run(cmd)