Skip to content

Commit

Permalink
ozone/wayland: launch dbus for tests with Wayland
Browse files Browse the repository at this point in the history
dbus_unittests failed in Ozone/Wayland tester as long as
dbus wasn't launched. The error message about missing
"$DISPLAY for X11" was misleading, and it was just rather
required to launch dbus via xvfb script.

This CL fixes the issue by reusing the existing method in the
same script that is able to launch Dbus for Wayland
as well (the "xvfb.py --use-weston --no-xvfb" case).

Bug: 1184129
Change-Id: Ie0580e280c10344c3795cf4ac46575bfe4a3dff6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2739479
Auto-Submit: Maksim Sisov <msisov@igalia.com>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/master@{#860288}
  • Loading branch information
msisov authored and Chromium LUCI CQ committed Mar 5, 2021
1 parent ff4a482 commit 6f007d6
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 26 deletions.
2 changes: 0 additions & 2 deletions dbus/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ test("dbus_unittests") {
]

configs += [ "//build/config/linux/dbus" ]

data_deps = [ "//testing/buildbot/filters:dbus_unittests_filters" ]
}

executable("dbus_test_server") {
Expand Down
3 changes: 1 addition & 2 deletions testing/buildbot/chromium.linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -6225,8 +6225,7 @@
"--no-xvfb",
"--use-weston",
"--ozone-platform=wayland",
"--enable-features=UseOzonePlatform",
"--test-launcher-filter-file=../../testing/buildbot/filters/ozone-linux.dbus_unittests_wayland.filter"
"--enable-features=UseOzonePlatform"
],
"merge": {
"args": [],
Expand Down
7 changes: 0 additions & 7 deletions testing/buildbot/filters/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,6 @@ source_set("content_unittests_filters") {
data = [ "//testing/buildbot/filters/webrtc.content_unittests.filter" ]
}

source_set("dbus_unittests_filters") {
testonly = true

data =
[ "//testing/buildbot/filters/ozone-linux.dbus_unittests_wayland.filter" ]
}

source_set("sync_integration_tests_filters") {
testonly = true

Expand Down

This file was deleted.

10 changes: 0 additions & 10 deletions testing/buildbot/test_suite_exceptions.pyl
Original file line number Diff line number Diff line change
Expand Up @@ -1259,16 +1259,6 @@
},
},
},
'dbus_unittests_wayland': {
'modifications': {
# CI Ozone/Wayland tester.
'Linux Tester (Ozone Wayland)': {
'args': [
'--test-launcher-filter-file=../../testing/buildbot/filters/ozone-linux.dbus_unittests_wayland.filter',
],
},
}
},
'depth_capture_tests': {
# TODO(https://crbug.com/850107): Remove the Android FYI Release (Pixel 2)
# exception once there is enough capacity to run these tests.
Expand Down
7 changes: 7 additions & 0 deletions testing/xvfb.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ def _run_with_weston(cmd, env, stdoutfile):
signal.signal(signal.SIGTERM, raise_weston_error)
signal.signal(signal.SIGINT, raise_weston_error)

dbus_pid = launch_dbus(env)

# The bundled weston (//third_party/weston) is used by Linux Ozone Wayland
# CI and CQ testers and compiled by //ui/ozone/platform/wayland whenever
# there is a dependency on the Ozone/Wayland and use_bundled_weston is set
Expand Down Expand Up @@ -302,6 +304,11 @@ def _run_with_weston(cmd, env, stdoutfile):
finally:
kill(weston_proc, 'weston')

# dbus-daemon is not a subprocess, so we can't SIGTERM+waitpid() on it.
# To ensure it exits, use SIGKILL which should be safe since all other
# processes that it would have been servicing have exited.
if dbus_pid:
os.kill(dbus_pid, signal.SIGKILL)

def _get_display_from_weston(weston_proc_pid):
"""Retrieves $WAYLAND_DISPLAY set by Weston.
Expand Down

0 comments on commit 6f007d6

Please sign in to comment.