Commit 6b175c5c by Maksim Sisov Committed by Commit Bot

X11 and Ozone: fallback to X11 backend for tests.

USE_X11 && USE_OZONE build is a new config for Chromium/Linux that is going to be enabled soon. However, it breaks angle tests for Linux bots that run these tests. Atm, we don't support Wayland in angle anyway, and always falling back to X11 is the right thing to do. However, it's a bit strange to return false in IsOzone for USE_X11 && USE_OZONE case, but it's something we can do now to unblock switching Chromium to use_x11 && use_ozone config for Linux and resolve the problem later. Bug: angleproject:4977 Bug: chromium:1085700 Change-Id: Id223110cc504d8a4faa38608a96338a297a8cfc3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2367856Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
parent c7645886
...@@ -216,7 +216,23 @@ bool IsOSX() ...@@ -216,7 +216,23 @@ bool IsOSX()
bool IsOzone() bool IsOzone()
{ {
#if defined(USE_OZONE) #if defined(USE_OZONE) && defined(USE_X11)
// We do not have a proper support for Ozone/Linux yet. Still, we need to figure out how to
// properly initialize tests and differentiate between X11 and Wayland. Probably, passing a
// command line argument could be sufficient. At the moment, run tests only for X11 backend
// as we don't have Wayland support in Angle. Yes, this is a bit weird to return false, but
// it makes it possible to continue angle tests with X11 regardless of the Chromium config
// for linux, which is use_x11 && use_ozone. Also, IsOzone is a bit vague now. It was only
// expected that angle could run with ozone/drm backend for ChromeOS. And returning true
// for desktop Linux when USE_OZONE && USE_X11 are both defined results in incorrect tests'
// expectations. We should also rework them and make IsOzone less vague.
//
// TODO(crbug.com/angleproject/4977): make it possible to switch between X11 and Wayland on
// Ozone/Linux builds. Probably, it's possible to identify the WAYLAND backend by checking
// the WAYLAND_DISPLAY or XDG_SESSION_TYPE env vars. And also make the IsOzone method less
// vague (read the comment above).
return false;
#elif defined(USE_OZONE)
return true; return true;
#else #else
return false; return false;
......
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