Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | from oeqa.runtime.case import OERuntimeTestCase |
| 2 | from oeqa.core.decorator.depends import OETestDepends |
| 3 | from oeqa.core.decorator.oeid import OETestID |
| 4 | from oeqa.core.decorator.data import skipIfNotFeature |
Brad Bishop | 977dc1a | 2019-02-06 16:01:43 -0500 | [diff] [blame^] | 5 | from oeqa.runtime.decorator.package import OEHasPackage |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 6 | |
| 7 | class XorgTest(OERuntimeTestCase): |
| 8 | |
| 9 | @OETestID(1151) |
| 10 | @skipIfNotFeature('x11-base', |
| 11 | 'Test requires x11 to be in IMAGE_FEATURES') |
| 12 | @OETestDepends(['ssh.SSHTest.test_ssh']) |
Brad Bishop | 977dc1a | 2019-02-06 16:01:43 -0500 | [diff] [blame^] | 13 | @OEHasPackage(['xserver-nodm-init']) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 14 | def test_xorg_running(self): |
| 15 | cmd ='%s | grep -v xinit | grep [X]org' % self.tc.target_cmds['ps'] |
| 16 | status, output = self.target.run(cmd) |
| 17 | msg = ('Xorg does not appear to be running %s' % |
| 18 | self.target.run(self.tc.target_cmds['ps'])[1]) |
| 19 | self.assertEqual(status, 0, msg=msg) |