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

Unified Diff: tools/telemetry/run_tests

Issue 1323303002: [Telemetry] Add timeout to telemetry run_tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | tools/telemetry/third_party/subprocess32/ChangeLog » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/run_tests
diff --git a/tools/telemetry/run_tests b/tools/telemetry/run_tests
index dc050435a5f48db40f357ad8f33788392b45d46a..a5bece130d0c5c73c4071a1e3e58c9639659814e 100755
--- a/tools/telemetry/run_tests
+++ b/tools/telemetry/run_tests
@@ -5,19 +5,24 @@
import os
import sys
-import subprocess
+
+TELEMETRY_DIR = os.path.dirname(os.path.realpath(__file__))
+
+sys.path.append(os.path.join(TELEMETRY_DIR, 'third_party', 'subprocess32'))
+import subprocess32
if __name__ == '__main__':
- telemetry_dir = os.path.dirname(os.path.realpath(__file__))
env = os.environ.copy()
if 'PYTHONPATH' in env:
- env['PYTHONPATH'] = env['PYTHONPATH'] + os.pathsep + telemetry_dir
+ env['PYTHONPATH'] = env['PYTHONPATH'] + os.pathsep + TELEMETRY_DIR
else:
- env['PYTHONPATH'] = telemetry_dir
+ env['PYTHONPATH'] = TELEMETRY_DIR
- path_to_run_tests = os.path.join(telemetry_dir, 'telemetry', 'testing',
+ path_to_run_tests = os.path.join(TELEMETRY_DIR, 'telemetry', 'testing',
'run_tests.py')
- argv = ['--top-level-dir', telemetry_dir] + sys.argv[1:]
- sys.exit(subprocess.call([sys.executable, path_to_run_tests] + argv, env=env))
+ argv = ['--top-level-dir', TELEMETRY_DIR] + sys.argv[1:]
+ # Timeout test run after 10 minutes.
+ sys.exit(subprocess32.call(
+ [sys.executable, path_to_run_tests] + argv, env=env, timeout=600))
« no previous file with comments | « no previous file | tools/telemetry/third_party/subprocess32/ChangeLog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698