summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/cases/weston.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/runtime/cases/weston.py')
-rw-r--r--meta/lib/oeqa/runtime/cases/weston.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/meta/lib/oeqa/runtime/cases/weston.py b/meta/lib/oeqa/runtime/cases/weston.py
index ac29eca6e4..36b4f9e375 100644
--- a/meta/lib/oeqa/runtime/cases/weston.py
+++ b/meta/lib/oeqa/runtime/cases/weston.py
@@ -34,7 +34,10 @@ class WestonTest(OERuntimeTestCase):
return 'export XDG_RUNTIME_DIR=/run/user/0; export WAYLAND_DISPLAY=wayland-0; %s' % cmd
def run_weston_init(self):
- self.target.run(self.get_weston_command('weston --log=%s' % self.weston_log_file))
+ if 'systemd' in self.tc.td['DISTRO_FEATURES']:
+ self.target.run('systemd-run --collect --unit=weston-ptest.service --uid=0 -p PAMName=login -p TTYPath=/dev/tty6 -E XDG_RUNTIME_DIR=/tmp -E WAYLAND_DISPLAY=wayland-0 /usr/bin/weston --socket=wayland-1 --log=%s' % self.weston_log_file)
+ else:
+ self.target.run(self.get_weston_command('openvt -- weston --socket=wayland-1 --log=%s' % self.weston_log_file))
def get_new_wayland_processes(self, existing_wl_processes):
try_cnt = 0
@@ -63,7 +66,10 @@ class WestonTest(OERuntimeTestCase):
new_wl_processes, try_cnt = self.get_new_wayland_processes(existing_wl_processes)
existing_and_new_weston_processes = self.get_processes_of('weston', 'existing and new')
new_weston_processes = [x for x in existing_and_new_weston_processes if x not in existing_weston_processes]
- for w in new_weston_processes:
- self.target.run('kill -9 %s' % w)
+ if 'systemd' in self.tc.td['DISTRO_FEATURES']:
+ self.target.run('systemctl stop weston-ptest.service')
+ else:
+ for w in new_weston_processes:
+ self.target.run('kill -9 %s' % w)
__, weston_log = self.target.run('cat %s' % self.weston_log_file)
self.assertTrue(new_wl_processes, msg='Could not get new weston-desktop-shell processes (%s, try_cnt:%s) weston log: %s' % (new_wl_processes, try_cnt, weston_log))