Skip to contentSkip to conversation

oeqa/runtime/cases/graphic: Enable graphic opengl testing

PATCH New Yeoh Ee Peng 1 participant 2 messages May 17, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 oeqa/runtime/cases/graphic: Enable graphic opengl testing

Convert manual testcase bsps-hw.bsps-hw.bsps-hw.Graphics_-_ABAT from oeqa/manual/bsp-hw.json to runtime automated test.

---
 meta/lib/oeqa/runtime/cases/graphic.py | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 meta/lib/oeqa/runtime/cases/graphic.py
meta/lib/oeqa/runtime/cases/graphic.py new file +25 -0
new file mode 100644
index 0000000..7d484c4
@@ -0,0 +1,25 @@
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.runtime.decorator.package import OEHasPackage
+from oeqa.core.decorator.data import skipIfNotFeature
+import threading
+import time
+
+class GraphicTestThread(threading.Thread):
+   def __init__(self, target_function, target_args=()):
+      threading.Thread.__init__(self, target=target_function, args=target_args)
+
+class GraphicTest(OERuntimeTestCase):
+    def run_graphic_test(self, run_args):
+        self.target.run(run_args)
+
+    @skipIfNotFeature('x11-base', 'Test requires x11 to be in IMAGE_FEATURES')
+    @OEHasPackage(['mesa-demos'])
+    @OETestDepends(['ssh.SSHTest.test_ssh'])
+    def test_graphic_opengl_with_glxgears(self):
+        gt_thread = GraphicTestThread(self.run_graphic_test, target_args=('export DISPLAY=:0; glxgears',))
+        gt_thread.start()
+        time.sleep(2)
+        status, output = self.target.run('pidof glxgears')
+        self.target.run('kill %s' % output)
+        self.assertEqual(status, 0, msg='Not able to find process that run glxgears.')
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/2 oeqa/manual/bsp-hw.json: Remove opengl graphic testing

Remove the bsps-hw.bsps-hw.Graphics_-_ABAT as it was replaced by the new automated runtime oeqa/runtime/cases/graphic.py.

---
 meta/lib/oeqa/manual/bsp-hw.json | 26 --------------------------
 1 file changed, 26 deletions(-)
meta/lib/oeqa/manual/bsp-hw.json +0 -26
index 4b7c76f..931f40a 100644
@@ -873,32 +873,6 @@
     },
     {
         "test": {
-            "@alias": "bsps-hw.bsps-hw.Graphics_-_ABAT",
-            "author": [
-                {
-                    "email": "[email protected]",
-                    "name": "[email protected]"
-                }
-            ],
-            "execution": {
-                "1": {
-                    "action": "Download ABAT test suite from internal git repository, git clone git://tinderbox.sh.intel.com/git/abat",
-                    "expected_results": ""
-                },
-                "2": {
-                    "action": "Apply following patch to make it work on yocto environment",
-                    "expected_results": ""
-                },
-                "3": {
-                    "action": "Run \"./abat.sh\" to run ABAT test refer to abat.patch",
-                    "expected_results": "All ABAT test should pass. \nNote : If below 3 fails appears ignore them. \n- start up X server fail.. due is already up \n- module [intel_agp] \n- module [i915]"
-                }
-            },
-            "summary": "Graphics_-_ABAT"
-        }
-    },
-    {
-        "test": {
             "@alias": "bsps-hw.bsps-hw.Graphics_-_x11perf_-_2D",
             "author": [
                 {
Signature · 1 line
2.7.4