summaryrefslogtreecommitdiffstats
path: root/meta-selftest
diff options
context:
space:
mode:
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 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))