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