df.py 528 B

12345678910111213
  1. from oeqa.runtime.case import OERuntimeTestCase
  2. from oeqa.core.decorator.depends import OETestDepends
  3. from oeqa.runtime.decorator.package import OEHasPackage
  4. class DfTest(OERuntimeTestCase):
  5. @OETestDepends(['ssh.SSHTest.test_ssh'])
  6. @OEHasPackage(['coreutils', 'busybox'])
  7. def test_df(self):
  8. cmd = "df / | sed -n '2p' | awk '{print $4}'"
  9. (status,output) = self.target.run(cmd)
  10. msg = 'Not enough space on image. Current size is %s' % output
  11. self.assertTrue(int(output)>5120, msg=msg)