blob: d6845587c297fa0c57e1872e62f14aa7e44fc550 [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001#
2# SPDX-License-Identifier: MIT
3#
4
Brad Bishop6e60e8b2018-02-01 10:27:11 -05005from oeqa.runtime.case import OERuntimeTestCase
6from oeqa.core.decorator.depends import OETestDepends
Brad Bishop6e60e8b2018-02-01 10:27:11 -05007from oeqa.core.decorator.data import skipIfNotFeature
Brad Bishop977dc1a2019-02-06 16:01:43 -05008from oeqa.runtime.decorator.package import OEHasPackage
Brad Bishop6e60e8b2018-02-01 10:27:11 -05009
10class XorgTest(OERuntimeTestCase):
11
Brad Bishop6e60e8b2018-02-01 10:27:11 -050012 @skipIfNotFeature('x11-base',
13 'Test requires x11 to be in IMAGE_FEATURES')
14 @OETestDepends(['ssh.SSHTest.test_ssh'])
Brad Bishop977dc1a2019-02-06 16:01:43 -050015 @OEHasPackage(['xserver-nodm-init'])
Brad Bishop6e60e8b2018-02-01 10:27:11 -050016 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)