Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | from oeqa.runtime.case import OERuntimeTestCase |
| 2 | from oeqa.core.decorator.depends import OETestDepends |
| 3 | import subprocess |
| 4 | import oe.lsb |
| 5 | |
| 6 | class 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 Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 12 | self.assertIn("features: +virgl", output, "virgl acceleration seems to be disabled:\n%s" %(output)) |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 13 | |
| 14 | @OETestDepends(['virgl.VirglTest.test_kernel_driver']) |
| 15 | def test_kmscube(self): |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 16 | status, output = self.target.run('kmscube') |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 17 | self.assertEqual(status, 0, "kmscube exited with non-zero status %d and output:\n%s" %(status, output)) |
| 18 | self.assertIn('renderer: "virgl"', output, "kmscube does not seem to use virgl:\n%s" %(output)) |