Commit 866d30a1 authored by Maksim Sisov's avatar Maksim Sisov Committed by Commit Bot

xvfb: weston_proc: look up for display only in a child weston proc

I accidentally left some lines of code that looked up for the
WAYLAND_DISPLAY in a parent weston proc. This is incorrect and
results in tests running in a wrong display if there are more than
one Wayland compositor running (for example, running tests with
the script on a local machine that has already had a Wayland session).

Bug: 1029241
Change-Id: I9855b41d50790805850471176d2abf4802fb7990
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2111671Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Reviewed-by: default avatarCaleb Rouleau <crouleau@chromium.org>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Cr-Commit-Position: refs/heads/master@{#753233}
parent 59047db0
...@@ -275,11 +275,6 @@ def _get_display_from_weston(weston_proc_pid): ...@@ -275,11 +275,6 @@ def _get_display_from_weston(weston_proc_pid):
parent = psutil.Process(weston_proc_pid) parent = psutil.Process(weston_proc_pid)
if parent is None: if parent is None:
break # The process is not found. Give up. break # The process is not found. Give up.
weston_proc_display = parent.environ().get('WAYLAND_DISPLAY')
# If display is set, Weston could start successfully and we can use
# that display for Wayland connection in Chromium.
if weston_proc_display is not None:
return weston_proc_display
# Traverse through all the children processes and find the # Traverse through all the children processes and find the
# "weston-desktop-shell" process that sets local to process env variables # "weston-desktop-shell" process that sets local to process env variables
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment