df.py 564 B

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