Index: mojo/tools/mopy/gtest.py |
diff --git a/mojo/tools/mopy/gtest.py b/mojo/tools/mopy/gtest.py |
index ed9848a985f82dae730423b9e45433cc135aa757..915ab1af061876656e0ac1f236f2dd99c2cd75e9 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 |
import subprocess |
import sys |
+import tempfile |
import time |
from mopy.config import Config |
@@ -154,8 +156,11 @@ def _run_test_with_timeout(config, shell, args, apptest, timeout_in_seconds=10): |
def _run_test(config, shell, args, apptest, result): |
"""Run the given test and puts the output in |result|.""" |
if (config.target_os != Config.OS_ANDROID): |
+ temp_dir = tempfile.mkdtemp() |
msw
2015/06/24 00:14:40
Avoid making the temp dir and appending the argume
Elliot Glaysher
2015/06/24 22:22:41
I've changed the entire approach here. I set a --u
|
command = _build_command_line(config, args, apptest) |
+ command += ['--user-data-dir=%s' % temp_dir] |
msw
2015/06/24 00:14:40
Hmm, this argument won't appear in the logs when _
|
result.put(subprocess.check_output(command, stderr=subprocess.STDOUT)) |
+ shutil.rmtree(temp_dir) |
return |
assert shell |