summaryrefslogtreecommitdiffstats
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:27:06 +0000
commitd3c7d1a0366c12e576bc015449928ac96c78ca18 (patch)
treed02e42317a69fdccd5555f21567f6de5eacd943c /meta-selftest
parent258123faa06027046445ba13a3f12b0a0e33dfd8 (diff)
downloadpoky-d3c7d1a0366c12e576bc015449928ac96c78ca18.tar.gz
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. (From OE-Core rev: 2868e8dfb9e62b49cd06f6c2d010405079d3a71c) 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 0000000000..fd6b7851db
--- /dev/null
+++ b/meta-selftest/lib/oeqa/runtime/cases/virgl.py
@@ -0,0 +1,17 @@
1from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.core.decorator.depends import OETestDepends
3import subprocess
4
5class VirglTest(OERuntimeTestCase):
6
7 @OETestDepends(['ssh.SSHTest.test_ssh'])
8 def test_kernel_driver(self):
9 status, output = self.target.run('dmesg|grep virgl')
10 self.assertEqual(status, 0, "Checking for virgl driver in dmesg returned non-zero: %d\n%s" % (status, output))
11 self.assertIn("virgl 3d acceleration enabled", output, "virgl acceleration seems to be disabled:\n%s" %(output))
12
13 @OETestDepends(['virgl.VirglTest.test_kernel_driver'])
14 def test_kmscube(self):
15 status, output = self.target.run('kmscube', timeout=30)
16 self.assertEqual(status, 0, "kmscube exited with non-zero status %d and output:\n%s" %(status, output))
17 self.assertIn('renderer: "virgl"', output, "kmscube does not seem to use virgl:\n%s" %(output))