summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/cases
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-11-09 09:31:29 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-11-11 10:08:12 +0000
commita839c9ba881ea3fae06a3a4d85e27832a9b2762d (patch)
treecae106dc91cbdd8f9ec10417b9521a4ed207d64e /meta/lib/oeqa/runtime/cases
parent65993a90a6c3b780cf724f6409683b4b8e6c1845 (diff)
downloadpoky-a839c9ba881ea3fae06a3a4d85e27832a9b2762d.tar.gz
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 <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime/cases')
-rw-r--r--meta/lib/oeqa/runtime/cases/weston.py4
1 files changed, 2 insertions, 2 deletions
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):
34 return 'export XDG_RUNTIME_DIR=/run/user/0; export WAYLAND_DISPLAY=wayland-0; %s' % cmd 34 return 'export XDG_RUNTIME_DIR=/run/user/0; export WAYLAND_DISPLAY=wayland-0; %s' % cmd
35 35
36 def run_weston_init(self): 36 def run_weston_init(self):
37 if 'systemd' in self.tc.td['DISTRO_FEATURES']: 37 if 'systemd' in self.tc.td['VIRTUAL-RUNTIME_init_manager']:
38 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) 38 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)
39 else: 39 else:
40 self.target.run(self.get_weston_command('openvt -- weston --socket=wayland-1 --log=%s' % self.weston_log_file)) 40 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):
66 new_wl_processes, try_cnt = self.get_new_wayland_processes(existing_wl_processes) 66 new_wl_processes, try_cnt = self.get_new_wayland_processes(existing_wl_processes)
67 existing_and_new_weston_processes = self.get_processes_of('weston', 'existing and new') 67 existing_and_new_weston_processes = self.get_processes_of('weston', 'existing and new')
68 new_weston_processes = [x for x in existing_and_new_weston_processes if x not in existing_weston_processes] 68 new_weston_processes = [x for x in existing_and_new_weston_processes if x not in existing_weston_processes]
69 if 'systemd' in self.tc.td['DISTRO_FEATURES']: 69 if 'systemd' in self.tc.td['VIRTUAL-RUNTIME_init_manager']:
70 self.target.run('systemctl stop weston-ptest.service') 70 self.target.run('systemctl stop weston-ptest.service')
71 else: 71 else:
72 for w in new_weston_processes: 72 for w in new_weston_processes: