From 8cec1bb7352a385abc4ac74230859046bbeb30d3 Mon Sep 17 00:00:00 2001 From: msw Date: Wed, 15 Jul 2015 20:07:25 -0700 Subject: Fix start_xvfb return value; don't run xvfb for Android apptests. The Chromium Mojo Android bot is failing apptests: http://build.chromium.org/p/chromium.mojo/builders/Chromium%20Mojo%20Android The return value was a mistake in my recent CL's latest patch set: https://codereview.chromium.org/1239563003 The platform filtering was a mistake in my recent CL: https://codereview.chromium.org/1230683002 BUG=NONE TEST=Chromium Mojo Android bot passes apptests. TBR=maruel@chromium.org,sky@chromium.org Review URL: https://codereview.chromium.org/1224263005 Cr-Commit-Position: refs/heads/master@{#338979} --- mojo/tools/mopy/gtest.py | 5 +++-- testing/xvfb.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mojo/tools/mopy/gtest.py b/mojo/tools/mopy/gtest.py index 887ae07..bb8306c 100644 --- a/mojo/tools/mopy/gtest.py +++ b/mojo/tools/mopy/gtest.py @@ -147,7 +147,8 @@ def _run_test_with_xvfb(config, shell, args, apptest): xvfb_proc = None openbox_proc = None env = os.environ.copy() - if '--gtest_list_tests' not in args and xvfb.should_start_xvfb(env): + if (config.target_os == Config.OS_LINUX and '--gtest_list_tests' not in args + and xvfb.should_start_xvfb(env)): (xvfb_proc, openbox_proc) = xvfb.start_xvfb(env, Paths(config).build_dir) if not xvfb_proc or not xvfb_proc.pid: raise Exception('Xvfb failed to start; aborting test run.') @@ -197,7 +198,7 @@ def _run_test(config, shell, args, apptest, env, result): output = '' exception = '' try: - if (config.target_os != Config.OS_ANDROID): + if config.target_os != Config.OS_ANDROID: command = _build_command_line(config, args, apptest) process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) diff --git a/testing/xvfb.py b/testing/xvfb.py index c6e9ddf..67ef729 100755 --- a/testing/xvfb.py +++ b/testing/xvfb.py @@ -79,7 +79,7 @@ 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 + return (None, None) # Some ChromeOS tests need a window manager. openbox_proc = subprocess.Popen('openbox', stdout=subprocess.PIPE, -- cgit v1.1