poky/meta-selftest/lib/oeqa/runtime/cases/virgl.py
Alexander Kanavin cdb0abc90e meta-selftest: correct the virgl test for 5.8 kernels
(From OE-Core rev: 879bbe341b47ff576de76b2e8929df9f72f7f813)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-25 01:00:37 +01:00

19 lines
907 B
Python

from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
import subprocess
import oe.lsb
class VirglTest(OERuntimeTestCase):
@OETestDepends(['ssh.SSHTest.test_ssh'])
def test_kernel_driver(self):
status, output = self.target.run('dmesg|grep virgl')
self.assertEqual(status, 0, "Checking for virgl driver in dmesg returned non-zero: %d\n%s" % (status, output))
self.assertIn("features: +virgl", output, "virgl acceleration seems to be disabled:\n%s" %(output))
@OETestDepends(['virgl.VirglTest.test_kernel_driver'])
def test_kmscube(self):
status, output = self.target.run('kmscube', timeout=30)
self.assertEqual(status, 0, "kmscube exited with non-zero status %d and output:\n%s" %(status, output))
self.assertIn('renderer: "virgl"', output, "kmscube does not seem to use virgl:\n%s" %(output))