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

Unified Diff: build/android/pylib/perf/test_runner.py

Issue 300063017: Fix silent failures in test runner that lead to long timeouts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Unbreak windows. Created 6 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 | « build/android/pylib/cmd_helper.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/perf/test_runner.py
diff --git a/build/android/pylib/perf/test_runner.py b/build/android/pylib/perf/test_runner.py
index cedf5734d8315bd6947f12c10b13140246a8ea57..71a613e93c0e1c5903c9fc7a87ed4d6b1bd513ae 100644
--- a/build/android/pylib/perf/test_runner.py
+++ b/build/android/pylib/perf/test_runner.py
@@ -49,9 +49,9 @@ import sys
import threading
import time
+from pylib import cmd_helper
from pylib import constants
from pylib import forwarder
-from pylib import pexpect
from pylib.base import base_test_result
from pylib.base import base_test_runner
@@ -200,13 +200,12 @@ class TestRunner(base_test_runner.BaseTestRunner):
cwd = os.path.abspath(constants.DIR_SOURCE_ROOT)
if full_cmd.startswith('src/'):
cwd = os.path.abspath(os.path.join(constants.DIR_SOURCE_ROOT, os.pardir))
- output, exit_code = pexpect.run(
- full_cmd, cwd=cwd,
- withexitstatus=True, logfile=logfile, timeout=timeout,
- env=os.environ)
- if self._options.single_step:
- # Stop the logger.
- logfile.stop()
+ try:
+ exit_code, output = cmd_helper.GetCmdStatusAndOutputWithTimeout(
+ full_cmd, timeout, cwd=cwd, shell=True, logfile=logfile)
+ finally:
+ if self._options.single_step:
+ logfile.stop()
end_time = datetime.datetime.now()
if exit_code is None:
exit_code = -1
« no previous file with comments | « build/android/pylib/cmd_helper.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698