From a839c9ba881ea3fae06a3a4d85e27832a9b2762d Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 9 Nov 2020 09:31:29 +0100 Subject: weston-init: correctly start under systemd Several issues are addressed: 1. weston requires pam when starting under systemd 2. systemd was attempting to launch weston twice (from sysvinit script and from systemd unit file) which caused confusion and errors. 3. runtime test should stop/start weston via systemd only if systemd actually controls system startup, not merely when systemd is present. (From OE-Core rev: 72dd74c5d384dbe641cc7c02ecf766ff8d5f555f) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- meta/lib/oeqa/runtime/cases/weston.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'meta/lib/oeqa/runtime/cases') diff --git a/meta/lib/oeqa/runtime/cases/weston.py b/meta/lib/oeqa/runtime/cases/weston.py index 36b4f9e375..d3fbf8ba92 100644 --- a/meta/lib/oeqa/runtime/cases/weston.py +++ b/meta/lib/oeqa/runtime/cases/weston.py @@ -34,7 +34,7 @@ class WestonTest(OERuntimeTestCase): return 'export XDG_RUNTIME_DIR=/run/user/0; export WAYLAND_DISPLAY=wayland-0; %s' % cmd def run_weston_init(self): - if 'systemd' in self.tc.td['DISTRO_FEATURES']: + if 'systemd' in self.tc.td['VIRTUAL-RUNTIME_init_manager']: 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)) @@ -66,7 +66,7 @@ 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] - if 'systemd' in self.tc.td['DISTRO_FEATURES']: + if 'systemd' in self.tc.td['VIRTUAL-RUNTIME_init_manager']: self.target.run('systemctl stop weston-ptest.service') else: for w in new_weston_processes: -- cgit v1.2.3-54-g00ecf