Convert manual testcase bsps-hw.bsps-hw.bsps-hw.Graphics_-_ABAT from oeqa/manual/bsp-hw.json to runtime automated test.
Signed-off-by: Yeoh Ee Peng <ee.peng.y...@intel.com> --- meta/lib/oeqa/runtime/cases/graphic.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 meta/lib/oeqa/runtime/cases/graphic.py diff --git a/meta/lib/oeqa/runtime/cases/graphic.py b/meta/lib/oeqa/runtime/cases/graphic.py new file mode 100644 index 0000000..7d484c4 --- /dev/null +++ b/meta/lib/oeqa/runtime/cases/graphic.py @@ -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.') -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core