blob: d301a19fa423c4f3d2a1fc176b0c0b012c9f1beb [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))
12 self.assertIn("virgl 3d acceleration enabled", output, "virgl acceleration seems to be disabled:\n%s" %(output))
13
14 @OETestDepends(['virgl.VirglTest.test_kernel_driver'])
15 def test_kmscube(self):
16
17 distro = oe.lsb.distro_identifier()
18 if distro and distro == 'centos-7':
19 self.skipTest('kmscube is not working when centos 7 is the host OS')
20
21 status, output = self.target.run('kmscube', timeout=30)
22 self.assertEqual(status, 0, "kmscube exited with non-zero status %d and output:\n%s" %(status, output))
23 self.assertIn('renderer: "virgl"', output, "kmscube does not seem to use virgl:\n%s" %(output))