Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(795)

Unified Diff: testing/xvfb.py

Issue 2008833002: allow usage of transparent visuals when using xvfb (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/scripts/run_telemetry_benchmark_as_googletest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/xvfb.py
diff --git a/testing/xvfb.py b/testing/xvfb.py
index 2b17d965d32ba5a106c7fcdb537742c64534e9dd..dd31c9c059d278d6951979e0329cc57b52a13d58 100755
--- a/testing/xvfb.py
+++ b/testing/xvfb.py
@@ -81,6 +81,7 @@ def start_xvfb(env, build_dir, xvfb_path='Xvfb', display=':9'):
env['DISPLAY'] = display
xvfb_proc = None
openbox_proc = None
+ xcompmgr_proc = None
try:
xvfb_cmd = [xvfb_path, display, '-screen', '0', '1280x800x24', '-ac',
@@ -98,18 +99,24 @@ def start_xvfb(env, build_dir, xvfb_path='Xvfb', display=':9'):
print 'Xvfb output:'
for l in xvfb_proc.communicate()[0].splitlines():
print '> %s' % l
- return (None, None)
+ return (None, None, None)
# Some ChromeOS tests need a window manager.
openbox_proc = subprocess.Popen('openbox', stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, env=env)
+
+ # Some tests need a compositing manager to make use of transparent visuals.
+ xcompmgr_proc = subprocess.Popen('xcompmgr', stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT, env=env)
except OSError as e:
- print >> sys.stderr, 'Failed to start Xvfb or Openbox: %s' % str(e)
+ print >> sys.stderr, 'Failed to start Xvfb or Openbox or xcompmgr: %s' % \
+ str(e)
kill(xvfb_proc)
kill(openbox_proc)
- return (None, None)
+ kill(xcompmgr_proc)
+ return (None, None, None)
- return (xvfb_proc, openbox_proc)
+ return (xvfb_proc, openbox_proc, xcompmgr_proc)
def run_executable(cmd, build_dir, env):
@@ -119,15 +126,18 @@ def run_executable(cmd, build_dir, env):
"""
xvfb = None
openbox = None
+ xcompmgr = None
if should_start_xvfb(env):
- (xvfb, openbox) = start_xvfb(env, build_dir)
- if not xvfb or not xvfb.pid or not openbox or not openbox.pid:
+ (xvfb, openbox, xcompmgr) = start_xvfb(env, build_dir)
+ if not xvfb or not xvfb.pid or not openbox or not openbox.pid or \
+ not xcompmgr or not xcompmgr.pid:
return 1
try:
return test_env.run_executable(cmd, env)
finally:
kill(xvfb)
kill(openbox)
+ kill(xcompmgr)
def main():
« no previous file with comments | « testing/scripts/run_telemetry_benchmark_as_googletest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698