summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/cases/df.py
blob: d8d79f32ea2ead1ecd79dd56eaa62effebb9aa56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#
# SPDX-License-Identifier: MIT
#

from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
from oeqa.runtime.decorator.package import OEHasPackage

class DfTest(OERuntimeTestCase):

    @OETestDepends(['ssh.SSHTest.test_ssh'])
    @OEHasPackage(['coreutils', 'busybox'])
    def test_df(self):
        cmd = "df / | sed -n '2p' | awk '{print $4}'"
        (status,output) = self.target.run(cmd)
        msg = 'Not enough space on image. Current size is %s' % output
        self.assertTrue(int(output)>5120, msg=msg)