1# 2# SPDX-License-Identifier: MIT 3# 4 5from oeqa.runtime.case import OERuntimeTestCase 6from oeqa.core.decorator.depends import OETestDepends 7from oeqa.core.decorator.data import skipIfDataVar, skipIfInDataVar 8from oeqa.runtime.decorator.package import OEHasPackage 9 10class DfTest(OERuntimeTestCase): 11 12 @OETestDepends(['ssh.SSHTest.test_ssh']) 13 @OEHasPackage(['coreutils', 'busybox']) 14 @skipIfInDataVar('IMAGE_FEATURES', 'read-only-rootfs', 'Test case df requires a writable rootfs') 15 def test_df(self): 16 cmd = "df -P / | sed -n '2p' | awk '{print $4}'" 17 (status,output) = self.target.run(cmd) 18 msg = 'Not enough space on image. Current size is %s' % output 19 self.assertTrue(int(output)>5120, msg=msg) 20