From 2868e8dfb9e62b49cd06f6c2d010405079d3a71c Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Sun, 3 Mar 2019 12:27:50 +0100 Subject: selftest: add tests for virgl GL acceleration Note that the tests require that the host machine has a X display, has mesa development files installed and is able to create OpenGL contexts. Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- meta-selftest/lib/oeqa/runtime/cases/virgl.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 meta-selftest/lib/oeqa/runtime/cases/virgl.py (limited to 'meta-selftest') diff --git a/meta-selftest/lib/oeqa/runtime/cases/virgl.py b/meta-selftest/lib/oeqa/runtime/cases/virgl.py new file mode 100644 index 0000000000..fd6b7851db --- /dev/null +++ b/meta-selftest/lib/oeqa/runtime/cases/virgl.py @@ -0,0 +1,17 @@ +from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.decorator.depends import OETestDepends +import subprocess + +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("virgl 3d acceleration enabled", 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)) -- cgit 1.2.3-korg