xorg.py 754 B

1234567891011121314151617
  1. from oeqa.runtime.case import OERuntimeTestCase
  2. from oeqa.core.decorator.depends import OETestDepends
  3. from oeqa.core.decorator.data import skipIfNotFeature
  4. from oeqa.runtime.decorator.package import OEHasPackage
  5. class XorgTest(OERuntimeTestCase):
  6. @skipIfNotFeature('x11-base',
  7. 'Test requires x11 to be in IMAGE_FEATURES')
  8. @OETestDepends(['ssh.SSHTest.test_ssh'])
  9. @OEHasPackage(['xserver-nodm-init'])
  10. def test_xorg_running(self):
  11. cmd ='%s | grep -v xinit | grep [X]org' % self.tc.target_cmds['ps']
  12. status, output = self.target.run(cmd)
  13. msg = ('Xorg does not appear to be running %s' %
  14. self.target.run(self.tc.target_cmds['ps'])[1])
  15. self.assertEqual(status, 0, msg=msg)