aboutsummaryrefslogtreecommitdiffstats
path: root/meta-selftest
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-03-03 12:27:50 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-03-04 14:26:41 +0000
commit2868e8dfb9e62b49cd06f6c2d010405079d3a71c (patch)
tree93dd2e6334fac4d9a49ea728a728a4c24f2b0d73 /meta-selftest
parent36fd0a334cd6ed309cf96e445af83447070412a3 (diff)
downloadopenembedded-core-contrib-2868e8dfb9e62b49cd06f6c2d010405079d3a71c.tar.gz
openembedded-core-contrib-2868e8dfb9e62b49cd06f6c2d010405079d3a71c.tar.bz2
openembedded-core-contrib-2868e8dfb9e62b49cd06f6c2d010405079d3a71c.zip
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 <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-selftest')
-rw-r--r--meta-selftest/lib/oeqa/runtime/cases/virgl.py17
1 files changed, 17 insertions, 0 deletions
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 00000000000..fd6b7851dbe
--- /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))