* [PATCH] oeqa/runtime/weston: Enhance weston tests
@ 2020-04-13 8:49 Yeoh Ee Peng
2020-04-13 8:58 ` [OE-core] " Alexander Kanavin
2020-04-16 22:35 ` Richard Purdie
0 siblings, 2 replies; 6+ messages in thread
From: Yeoh Ee Peng @ 2020-04-13 8:49 UTC (permalink / raw)
To: openembedded-core; +Cc: Yeoh Ee Peng
Existing weston test available make sure that a process
for weston-desktop-shell exist when image boot up.
Enhance weston tests by:
- execute weston-info to make sure weston interface(s)
are initialized
- execute weston and make sure it can initialize a
new wayland compositor
[YOCTO# 10690]
Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
---
meta/lib/oeqa/runtime/cases/weston.py | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/meta/lib/oeqa/runtime/cases/weston.py b/meta/lib/oeqa/runtime/cases/weston.py
index f32599a..f79ed64 100644
--- a/meta/lib/oeqa/runtime/cases/weston.py
+++ b/meta/lib/oeqa/runtime/cases/weston.py
@@ -6,6 +6,8 @@ from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
from oeqa.core.decorator.data import skipIfNotFeature
from oeqa.runtime.decorator.package import OEHasPackage
+import threading
+import time
class WestonTest(OERuntimeTestCase):
@@ -17,3 +19,31 @@ class WestonTest(OERuntimeTestCase):
msg = ('Weston does not appear to be running %s' %
self.target.run(self.tc.target_cmds['ps'])[1])
self.assertEqual(status, 0, msg=msg)
+
+ def get_weston_command(self, cmd):
+ return 'export XDG_RUNTIME_DIR=/run/user/0; export DISPLAY=:0; %s' % cmd
+
+ def run_weston_init(self):
+ self.target.run(self.get_weston_command('weston'))
+
+ @OEHasPackage(['weston'])
+ def test_weston_info(self):
+ status, output = self.target.run(self.get_weston_command('weston-info'))
+ self.assertEqual(status, 0, msg='weston-info error: %s' % output)
+
+ @OEHasPackage(['weston'])
+ def test_weston_can_initialize_new_wayland_compositor(self):
+ status, output = self.target.run('pidof weston-desktop-shell')
+ self.assertEqual(status, 0, msg='Retrieve existing weston-desktop-shell processes error: %s' % output)
+ existing_wl_processes = output.split(" ")
+
+ weston_thread = threading.Thread(target=self.run_weston_init)
+ weston_thread.start()
+ time.sleep(5)
+ status, output = self.target.run('pidof weston-desktop-shell')
+ self.assertEqual(status, 0, msg='Retrieve existing and new weston-desktop-shell processes error: %s' % output)
+ wl_processes = output.split(" ")
+ new_wl_processes = [x for x in wl_processes if x not in existing_wl_processes]
+ self.assertTrue(new_wl_processes, msg='Check new weston-desktop-shell processes error: %s' % new_wl_processes)
+ for wl in new_wl_processes:
+ self.target.run('kill -9 %s' % wl)
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] oeqa/runtime/weston: Enhance weston tests
2020-04-13 8:49 [PATCH] oeqa/runtime/weston: Enhance weston tests Yeoh Ee Peng
@ 2020-04-13 8:58 ` Alexander Kanavin
2020-04-16 22:35 ` Richard Purdie
1 sibling, 0 replies; 6+ messages in thread
From: Alexander Kanavin @ 2020-04-13 8:58 UTC (permalink / raw)
To: Yeoh Ee Peng; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 3182 bytes --]
Thanks, now one step closer to deprecating x11 :)
I'm thinking of rebasing all images used by autobuilder (e.g. -ptest, -sdk)
to be based off core-image-weston in 3.2 timeframe. The only sato image
would be core-image-sato itself.
Alex
On Mon, 13 Apr 2020 at 10:49, Yeoh Ee Peng <ee.peng.yeoh@intel.com> wrote:
> Existing weston test available make sure that a process
> for weston-desktop-shell exist when image boot up.
>
> Enhance weston tests by:
> - execute weston-info to make sure weston interface(s)
> are initialized
> - execute weston and make sure it can initialize a
> new wayland compositor
>
> [YOCTO# 10690]
>
> Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
> ---
> meta/lib/oeqa/runtime/cases/weston.py | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/meta/lib/oeqa/runtime/cases/weston.py
> b/meta/lib/oeqa/runtime/cases/weston.py
> index f32599a..f79ed64 100644
> --- a/meta/lib/oeqa/runtime/cases/weston.py
> +++ b/meta/lib/oeqa/runtime/cases/weston.py
> @@ -6,6 +6,8 @@ from oeqa.runtime.case import OERuntimeTestCase
> from oeqa.core.decorator.depends import OETestDepends
> from oeqa.core.decorator.data import skipIfNotFeature
> from oeqa.runtime.decorator.package import OEHasPackage
> +import threading
> +import time
>
> class WestonTest(OERuntimeTestCase):
>
> @@ -17,3 +19,31 @@ class WestonTest(OERuntimeTestCase):
> msg = ('Weston does not appear to be running %s' %
> self.target.run(self.tc.target_cmds['ps'])[1])
> self.assertEqual(status, 0, msg=msg)
> +
> + def get_weston_command(self, cmd):
> + return 'export XDG_RUNTIME_DIR=/run/user/0; export DISPLAY=:0;
> %s' % cmd
> +
> + def run_weston_init(self):
> + self.target.run(self.get_weston_command('weston'))
> +
> + @OEHasPackage(['weston'])
> + def test_weston_info(self):
> + status, output =
> self.target.run(self.get_weston_command('weston-info'))
> + self.assertEqual(status, 0, msg='weston-info error: %s' % output)
> +
> + @OEHasPackage(['weston'])
> + def test_weston_can_initialize_new_wayland_compositor(self):
> + status, output = self.target.run('pidof weston-desktop-shell')
> + self.assertEqual(status, 0, msg='Retrieve existing
> weston-desktop-shell processes error: %s' % output)
> + existing_wl_processes = output.split(" ")
> +
> + weston_thread = threading.Thread(target=self.run_weston_init)
> + weston_thread.start()
> + time.sleep(5)
> + status, output = self.target.run('pidof weston-desktop-shell')
> + self.assertEqual(status, 0, msg='Retrieve existing and new
> weston-desktop-shell processes error: %s' % output)
> + wl_processes = output.split(" ")
> + new_wl_processes = [x for x in wl_processes if x not in
> existing_wl_processes]
> + self.assertTrue(new_wl_processes, msg='Check new
> weston-desktop-shell processes error: %s' % new_wl_processes)
> + for wl in new_wl_processes:
> + self.target.run('kill -9 %s' % wl)
> --
> 2.7.4
>
>
>
[-- Attachment #2: Type: text/html, Size: 3994 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] oeqa/runtime/weston: Enhance weston tests
2020-04-13 8:49 [PATCH] oeqa/runtime/weston: Enhance weston tests Yeoh Ee Peng
2020-04-13 8:58 ` [OE-core] " Alexander Kanavin
@ 2020-04-16 22:35 ` Richard Purdie
2020-04-17 1:53 ` Yeoh Ee Peng
1 sibling, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2020-04-16 22:35 UTC (permalink / raw)
To: Yeoh Ee Peng, openembedded-core
On Mon, 2020-04-13 at 16:49 +0800, Yeoh Ee Peng wrote:
> Existing weston test available make sure that a process
> for weston-desktop-shell exist when image boot up.
>
> Enhance weston tests by:
> - execute weston-info to make sure weston interface(s)
> are initialized
> - execute weston and make sure it can initialize a
> new wayland compositor
>
> [YOCTO# 10690]
>
> Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
I think this fails under testing:
https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/1785
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] oeqa/runtime/weston: Enhance weston tests
2020-04-16 22:35 ` Richard Purdie
@ 2020-04-17 1:53 ` Yeoh Ee Peng
2020-04-17 14:23 ` Richard Purdie
0 siblings, 1 reply; 6+ messages in thread
From: Yeoh Ee Peng @ 2020-04-17 1:53 UTC (permalink / raw)
To: Richard Purdie, openembedded-core
Hi Richard,
After more testing, I realized that it will take different amount of time for each host machine to initialize new wayland compositor. I had added the logic to retry the checking of new wayland compositor to comprehend this host machine differences. I had submitted the v02 patch.
Thank you very much!
Thanks,
Yeoh Ee Peng
-----Original Message-----
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Sent: Friday, April 17, 2020 6:35 AM
To: Yeoh, Ee Peng <ee.peng.yeoh@intel.com>; openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] oeqa/runtime/weston: Enhance weston tests
On Mon, 2020-04-13 at 16:49 +0800, Yeoh Ee Peng wrote:
> Existing weston test available make sure that a process for
> weston-desktop-shell exist when image boot up.
>
> Enhance weston tests by:
> - execute weston-info to make sure weston interface(s)
> are initialized
> - execute weston and make sure it can initialize a
> new wayland compositor
>
> [YOCTO# 10690]
>
> Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
I think this fails under testing:
https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/1785
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] oeqa/runtime/weston: Enhance weston tests
2020-04-17 1:53 ` Yeoh Ee Peng
@ 2020-04-17 14:23 ` Richard Purdie
2020-04-21 0:56 ` Yeoh Ee Peng
0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2020-04-17 14:23 UTC (permalink / raw)
To: Yeoh, Ee Peng, openembedded-core
Hi Ee Peng,
On Fri, 2020-04-17 at 01:53 +0000, Yeoh, Ee Peng wrote:
> Hi Richard,
>
> After more testing, I realized that it will take different amount of
> time for each host machine to initialize new wayland compositor. I
> had added the logic to retry the checking of new wayland compositor
> to comprehend this host machine differences. I had submitted the v02
> patch.
>
> Thank you very much!
I did try the v2 patch but it still failed unfortunately:
https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/1788
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] oeqa/runtime/weston: Enhance weston tests
2020-04-17 14:23 ` Richard Purdie
@ 2020-04-21 0:56 ` Yeoh Ee Peng
0 siblings, 0 replies; 6+ messages in thread
From: Yeoh Ee Peng @ 2020-04-21 0:56 UTC (permalink / raw)
To: Richard Purdie, openembedded-core
Hi Richard,
I found that I had missed the DISTRO_FEATURES_remove = "x11" configuration during previous development and testing, I had successfully reproduce the issue after incorporate the DISTRO_FEATURES_remove = "x11". I had tested the v03 patch and submitted the patch.
Sorry for my mistake.
https://lists.openembedded.org/g/openembedded-core/message/137332
https://lists.openembedded.org/g/openembedded-core/message/137333
v03:
- previous patch missed the DISTRO_FEATURES_remove = "x11"
configuration in the building of core-image-weston, where
the test was using x11 DISPLAY for initializing new
wayland compositor
- replace the environment setup 'export DISPLAY=:0' which
use x11 with 'export WAYLAND_DISPLAY=wayland-0' since the
target core-image-weston had removed x11
- include logging for wayland compositor initialization
to track detail for debugging in case test fail
Thanks,
Ee Peng
-----Original Message-----
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Sent: Friday, April 17, 2020 10:24 PM
To: Yeoh, Ee Peng <ee.peng.yeoh@intel.com>; openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] oeqa/runtime/weston: Enhance weston tests
Hi Ee Peng,
On Fri, 2020-04-17 at 01:53 +0000, Yeoh, Ee Peng wrote:
> Hi Richard,
>
> After more testing, I realized that it will take different amount of
> time for each host machine to initialize new wayland compositor. I had
> added the logic to retry the checking of new wayland compositor to
> comprehend this host machine differences. I had submitted the v02
> patch.
>
> Thank you very much!
I did try the v2 patch but it still failed unfortunately:
https://autobuilder.yoctoproject.org/typhoon/#/builders/40/builds/1788
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-04-21 0:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13 8:49 [PATCH] oeqa/runtime/weston: Enhance weston tests Yeoh Ee Peng
2020-04-13 8:58 ` [OE-core] " Alexander Kanavin
2020-04-16 22:35 ` Richard Purdie
2020-04-17 1:53 ` Yeoh Ee Peng
2020-04-17 14:23 ` Richard Purdie
2020-04-21 0:56 ` Yeoh Ee Peng
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.