blob: 89fd0fb901a8c9d75a678c18f48836663d28012b [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001#
2# SPDX-License-Identifier: MIT
3#
4
Brad Bishop6e60e8b2018-02-01 10:27:11 -05005from oeqa.runtime.case import OERuntimeTestCase
6from oeqa.core.decorator.depends import OETestDepends
Brad Bishop977dc1a2019-02-06 16:01:43 -05007from oeqa.runtime.decorator.package import OEHasPackage
Brad Bishop6e60e8b2018-02-01 10:27:11 -05008
9class DfTest(OERuntimeTestCase):
10
Brad Bishop6e60e8b2018-02-01 10:27:11 -050011 @OETestDepends(['ssh.SSHTest.test_ssh'])
Brad Bishop977dc1a2019-02-06 16:01:43 -050012 @OEHasPackage(['coreutils', 'busybox'])
Brad Bishop6e60e8b2018-02-01 10:27:11 -050013 def test_df(self):
Brad Bishop64c979e2019-11-04 13:55:29 -050014 cmd = "df -P / | sed -n '2p' | awk '{print $4}'"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050015 (status,output) = self.target.run(cmd)
16 msg = 'Not enough space on image. Current size is %s' % output
17 self.assertTrue(int(output)>5120, msg=msg)