Chromium Code Reviews| Index: mojo/tools/mopy/gtest.py |
| diff --git a/mojo/tools/mopy/gtest.py b/mojo/tools/mopy/gtest.py |
| index ed9848a985f82dae730423b9e45433cc135aa757..46c3a203906a1c092f6f63f163ddf83ade4604c4 100644 |
| --- a/mojo/tools/mopy/gtest.py |
| +++ b/mojo/tools/mopy/gtest.py |
| @@ -6,8 +6,10 @@ import logging |
| import multiprocessing |
| import os |
| import re |
| +import shutil |
|
msw
2015/06/24 23:00:35
nit: remove
|
| import subprocess |
| import sys |
| +import tempfile |
|
msw
2015/06/24 23:00:35
nit: remove
|
| import time |
| from mopy.config import Config |
| @@ -130,10 +132,11 @@ def _build_command_line(config, args, apptest): |
| """Build the apptest command line. This value isn't executed on Android.""" |
| paths = Paths(config) |
| # On Linux, always run tests with xvfb, but not for --gtest_list_tests. |
| - use_xvfb = (config.target_os == Config.OS_LINUX and |
| - not "--gtest_list_tests" in args) |
| - prefix = [paths.xvfb, paths.build_dir] if use_xvfb else [] |
| - return prefix + [paths.mojo_runner] + args + [apptest] |
| + not_list_tests = not "--gtest_list_tests" in args |
| + use_xvfb = config.target_os == Config.OS_LINUX and not_list_tests |
| + xvfb_prefix = [paths.xvfb, paths.build_dir] if use_xvfb else [] |
| + data_dir = ["--use-temporary-user-data-dir"] if not_list_tests else [] |
| + return xvfb_prefix + [paths.mojo_runner] + data_dir + args + [apptest] |
| # TODO(msw): Determine proper test timeout durations (starting small). |