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(): |