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