blob: f19cdee9f09e8774f2252da4577695eccf266cab [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.core.decorator.depends import OETestDepends
3import subprocess
4import oe.lsb
5
6class VirglTest(OERuntimeTestCase):
7
8 @OETestDepends(['ssh.SSHTest.test_ssh'])
9 def test_kernel_driver(self):
10 status, output = self.target.run('dmesg|grep virgl')
11 self.assertEqual(status, 0, "Checking for virgl driver in dmesg returned non-zero: %d\n%s" % (status, output))
Andrew Geisslerc9f78652020-09-18 14:11:35 -050012 self.assertIn("features: +virgl", output, "virgl acceleration seems to be disabled:\n%s" %(output))
Brad Bishop19323692019-04-05 15:28:33 -040013
14 @OETestDepends(['virgl.VirglTest.test_kernel_driver'])
15 def test_kmscube(self):
Andrew Geissler4c19ea12020-10-27 13:52:24 -050016 status, output = self.target.run('kmscube')
Brad Bishop19323692019-04-05 15:28:33 -040017 self.assertEqual(status, 0, "kmscube exited with non-zero status %d and output:\n%s" %(status, output))
Andrew Geissler87f5cff2022-09-30 13:13:31 -050018 self.assertIn('renderer: "virgl', output, "kmscube does not seem to use virgl:\n%s" %(output))