Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 1 | from oeqa.runtime.case import OERuntimeTestCase |
| 2 | from oeqa.core.decorator.depends import OETestDepends |
| 3 | |
| 4 | import time |
| 5 | |
| 6 | class RunLevel_Test(OERuntimeTestCase): |
| 7 | |
| 8 | @OETestDepends(['ssh.SSHTest.test_ssh']) |
| 9 | def test_runlevel_3(self): |
| 10 | (status, output) = self.target.run("init 3 && sleep 5 && runlevel") |
| 11 | runlevel= '5 3' |
| 12 | self.assertEqual(output, runlevel, msg='Failed to set current runlevel to runlevel 3, current runlevel : %s' % output[-1]) |
| 13 | (status, output) = self.target.run("uname -a") |
| 14 | self.assertEqual(status, 0, msg='Failed to run uname command, output: %s' % output) |
| 15 | |
| 16 | @OETestDepends(['runlevel.RunLevel_Test.test_runlevel_3']) |
| 17 | def test_runlevel_5(self): |
| 18 | (status, output) = self.target.run("init 5 && sleep 5 && runlevel") |
| 19 | runlevel = '3 5' |
| 20 | self.assertEqual(output, runlevel, msg='Failed to set current runlevel to runlevel 5, current runlevel : %s' % output[-1]) |
| 21 | (status, output) = self.target.run('export DISPLAY=:0 && x11perf -aa10text') |
| 22 | self.assertEqual(status, 0, msg='Failed to run 2D graphic test, output: %s' % output) |