1from 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("features: +virgl", output, "virgl acceleration seems to be disabled:\n%s" %(output)) 13 14 @OETestDepends(['virgl.VirglTest.test_kernel_driver']) 15 def test_kmscube(self): 16 status, output = self.target.run('kmscube') 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)) 19