Reland: Run gl_unittests with Ozone X11.
Add a new test target gl_unittests_ozonex that runs with
--ozone-platform=x11. The Ozone CrOS bot will now run gl_unittests with
both Ozone headless and Ozone X11.
The test requires an X server to be running on the bot. The mb.py script
is modified to look for GN arg use_ozone=true and runtime flag
--ozone-platform=x11. In this case, it runs the test using xvfb.
Original commit crrev.com/2493063003 was reverted due to
crbug.com/665895. There was no dependency on xdisplaycheck by the new
test target that needs it. This caused problems during the isolate step
when xdisplaycheck wasn't found.
BUG=664570
Review-Url: https://codereview.chromium.org/2509033006
Cr-Commit-Position: refs/heads/master@{#435000}
diff --git a/tools/mb/mb.py b/tools/mb/mb.py
index 364671f..07ad4a2 100755
--- a/tools/mb/mb.py
+++ b/tools/mb/mb.py
@@ -1056,19 +1056,23 @@
return ret
def GetIsolateCommand(self, target, vals):
+ isolate_map = self.ReadIsolateMap()
+
android = 'target_os="android"' in vals['gn_args']
+ ozone = 'use_ozone=true' in vals['gn_args']
+ ozone_x11 = (ozone and 'args' in isolate_map[target] and
+ '--ozone-platform=x11' in isolate_map[target]['args'])
# This needs to mirror the settings in //build/config/ui.gni:
- # use_x11 = is_linux && !use_ozone.
+ # use_x11 = is_linux && !use_ozone || use_ozone && --ozone-platform=x11
use_x11 = (self.platform == 'linux2' and
not android and
- not 'use_ozone=true' in vals['gn_args'])
+ (ozone_x11 or not ozone))
asan = 'is_asan=true' in vals['gn_args']
msan = 'is_msan=true' in vals['gn_args']
tsan = 'is_tsan=true' in vals['gn_args']
- isolate_map = self.ReadIsolateMap()
test_type = isolate_map[target]['type']
executable = isolate_map[target].get('executable', target)