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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/telemetry/third_party/subprocess32/ChangeLog » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import os 6 import os
7 import sys 7 import sys
8 import subprocess 8
9 TELEMETRY_DIR = os.path.dirname(os.path.realpath(__file__))
10
11 sys.path.append(os.path.join(TELEMETRY_DIR, 'third_party', 'subprocess32'))
12 import subprocess32
9 13
10 14
11 if __name__ == '__main__': 15 if __name__ == '__main__':
12 telemetry_dir = os.path.dirname(os.path.realpath(__file__))
13 16
14 env = os.environ.copy() 17 env = os.environ.copy()
15 if 'PYTHONPATH' in env: 18 if 'PYTHONPATH' in env:
16 env['PYTHONPATH'] = env['PYTHONPATH'] + os.pathsep + telemetry_dir 19 env['PYTHONPATH'] = env['PYTHONPATH'] + os.pathsep + TELEMETRY_DIR
17 else: 20 else:
18 env['PYTHONPATH'] = telemetry_dir 21 env['PYTHONPATH'] = TELEMETRY_DIR
19 22
20 path_to_run_tests = os.path.join(telemetry_dir, 'telemetry', 'testing', 23 path_to_run_tests = os.path.join(TELEMETRY_DIR, 'telemetry', 'testing',
21 'run_tests.py') 24 'run_tests.py')
22 argv = ['--top-level-dir', telemetry_dir] + sys.argv[1:] 25 argv = ['--top-level-dir', TELEMETRY_DIR] + sys.argv[1:]
23 sys.exit(subprocess.call([sys.executable, path_to_run_tests] + argv, env=env)) 26 # Timeout test run after 10 minutes.
27 sys.exit(subprocess32.call(
28 [sys.executable, path_to_run_tests] + argv, env=env, timeout=600))
OLDNEW
« 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