blob: 09afb1e3d1b1b17bea59fea66e041f5924ed1125 [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001#
Patrick Williams92b42cb2022-09-03 06:53:57 -05002# Copyright OpenEmbedded Contributors
3#
Brad Bishopc342db32019-05-15 21:57:59 -04004# SPDX-License-Identifier: MIT
5#
6
Brad Bishop6e60e8b2018-02-01 10:27:11 -05007from oeqa.runtime.case import OERuntimeTestCase
8from oeqa.core.decorator.depends import OETestDepends
Brad Bishop6e60e8b2018-02-01 10:27:11 -05009from oeqa.core.decorator.data import skipIfNotFeature
Brad Bishop977dc1a2019-02-06 16:01:43 -050010from oeqa.runtime.decorator.package import OEHasPackage
Brad Bishop6e60e8b2018-02-01 10:27:11 -050011
12class XorgTest(OERuntimeTestCase):
13
Brad Bishop6e60e8b2018-02-01 10:27:11 -050014 @skipIfNotFeature('x11-base',
15 'Test requires x11 to be in IMAGE_FEATURES')
16 @OETestDepends(['ssh.SSHTest.test_ssh'])
Brad Bishop977dc1a2019-02-06 16:01:43 -050017 @OEHasPackage(['xserver-nodm-init'])
Brad Bishop6e60e8b2018-02-01 10:27:11 -050018 def test_xorg_running(self):
19 cmd ='%s | grep -v xinit | grep [X]org' % self.tc.target_cmds['ps']
20 status, output = self.target.run(cmd)
21 msg = ('Xorg does not appear to be running %s' %
22 self.target.run(self.tc.target_cmds['ps'])[1])
23 self.assertEqual(status, 0, msg=msg)