diff options
Diffstat (limited to 'poky/meta/lib/oeqa/runtime')
-rw-r--r-- | poky/meta/lib/oeqa/runtime/cases/df.py | 2 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/runtime/cases/runlevel.py | 22 |
2 files changed, 24 insertions, 0 deletions
diff --git a/poky/meta/lib/oeqa/runtime/cases/df.py b/poky/meta/lib/oeqa/runtime/cases/df.py index 89fd0fb901..bb155c9cf9 100644 --- a/poky/meta/lib/oeqa/runtime/cases/df.py +++ b/poky/meta/lib/oeqa/runtime/cases/df.py @@ -4,12 +4,14 @@ from oeqa.runtime.case import OERuntimeTestCase from oeqa.core.decorator.depends import OETestDepends +from oeqa.core.decorator.data import skipIfDataVar, skipIfInDataVar from oeqa.runtime.decorator.package import OEHasPackage class DfTest(OERuntimeTestCase): @OETestDepends(['ssh.SSHTest.test_ssh']) @OEHasPackage(['coreutils', 'busybox']) + @skipIfInDataVar('IMAGE_FEATURES', 'read-only-rootfs', 'Test case df requires a writable rootfs') def test_df(self): cmd = "df -P / | sed -n '2p' | awk '{print $4}'" (status,output) = self.target.run(cmd) diff --git a/poky/meta/lib/oeqa/runtime/cases/runlevel.py b/poky/meta/lib/oeqa/runtime/cases/runlevel.py new file mode 100644 index 0000000000..3a4df8ace1 --- /dev/null +++ b/poky/meta/lib/oeqa/runtime/cases/runlevel.py @@ -0,0 +1,22 @@ +from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.decorator.depends import OETestDepends + +import time + +class RunLevel_Test(OERuntimeTestCase): + + @OETestDepends(['ssh.SSHTest.test_ssh']) + def test_runlevel_3(self): + (status, output) = self.target.run("init 3 && sleep 5 && runlevel") + runlevel= '5 3' + self.assertEqual(output, runlevel, msg='Failed to set current runlevel to runlevel 3, current runlevel : %s' % output[-1]) + (status, output) = self.target.run("uname -a") + self.assertEqual(status, 0, msg='Failed to run uname command, output: %s' % output) + + @OETestDepends(['runlevel.RunLevel_Test.test_runlevel_3']) + def test_runlevel_5(self): + (status, output) = self.target.run("init 5 && sleep 5 && runlevel") + runlevel = '3 5' + self.assertEqual(output, runlevel, msg='Failed to set current runlevel to runlevel 5, current runlevel : %s' % output[-1]) + (status, output) = self.target.run('export DISPLAY=:0 && x11perf -aa10text') + self.assertEqual(status, 0, msg='Failed to run 2D graphic test, output: %s' % output) |