diff options
| -rw-r--r-- | meta/lib/oeqa/runtime/cases/weston.py | 4 | ||||
| -rw-r--r-- | meta/recipes-graphics/wayland/weston-init.bb | 9 |
2 files changed, 9 insertions, 4 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: |
diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb index b7a99be646..4b2a6ca983 100644 --- a/meta/recipes-graphics/wayland/weston-init.bb +++ b/meta/recipes-graphics/wayland/weston-init.bb | |||
| @@ -26,7 +26,9 @@ DEFAULTBACKEND_qemux86 = "drm" | |||
| 26 | DEFAULTBACKEND_qemux86-64 = "drm" | 26 | DEFAULTBACKEND_qemux86-64 = "drm" |
| 27 | 27 | ||
| 28 | do_install() { | 28 | do_install() { |
| 29 | install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston | 29 | if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then |
| 30 | install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston | ||
| 31 | fi | ||
| 30 | install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini | 32 | install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini |
| 31 | install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston | 33 | install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston |
| 32 | 34 | ||
| @@ -55,10 +57,13 @@ do_install() { | |||
| 55 | fi | 57 | fi |
| 56 | } | 58 | } |
| 57 | 59 | ||
| 60 | INHIBIT_UPDATERCD_BBCLASS = "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', '1', '', d)}" | ||
| 61 | |||
| 58 | inherit update-rc.d features_check systemd | 62 | inherit update-rc.d features_check systemd |
| 59 | 63 | ||
| 60 | # rdepends on weston which depends on virtual/egl | 64 | # rdepends on weston which depends on virtual/egl |
| 61 | REQUIRED_DISTRO_FEATURES = "opengl" | 65 | # requires pam enabled if started via systemd |
| 66 | REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}" | ||
| 62 | 67 | ||
| 63 | RDEPENDS_${PN} = "weston kbd" | 68 | RDEPENDS_${PN} = "weston kbd" |
| 64 | 69 | ||
