aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/df.py
blob: c9119898dc0ebd95a4a3c3190e6be9c1ef66a2a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import unittest
from oeqa.oetest import oeRuntimeTest
from oeqa.utils.decorators import *

def setUpModule():
    skipModuleUnless(oeRuntimeTest.tc.target.run('which df')[0] == 0, "No df in image or no connection")

class DfTest(oeRuntimeTest):

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