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

Unified Diff: tools/chrome_proxy/run_tests

Issue 741903002: Attempt #5 at converting telemetry to use typ :). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: telemetry-side fix needed to actually fix chrome_proxy Created 6 years, 1 month 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/perf/run_tests » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/chrome_proxy/run_tests
diff --git a/tools/chrome_proxy/run_tests b/tools/chrome_proxy/run_tests
index de413b91f12ca18e635be8ec7cca501946e40cc6..11780b1aa2913c52afc642bfde75f16281213dd7 100755
--- a/tools/chrome_proxy/run_tests
+++ b/tools/chrome_proxy/run_tests
@@ -9,18 +9,22 @@ This script DOES NOT run benchmarks. run_benchmark does that.
"""
import os
+import subprocess
import sys
-sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, 'telemetry'))
-sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, 'perf'))
-from telemetry.unittest_util import gtest_progress_reporter
-from telemetry.unittest_util import run_tests
+if __name__ == '__main__':
+ proxy_dir = os.path.dirname(os.path.realpath(__file__))
+ perf_dir = os.path.realpath(os.path.join(proxy_dir, '..', 'perf'))
+ telemetry_dir = os.path.realpath(os.path.join(proxy_dir, '..', 'telemetry'))
+ env = os.environ.copy()
+ if 'PYTHONPATH' in env:
+ env['PYTHONPATH'] = env['PYTHONPATH'] + os.pathsep + telemetry_dir
+ else:
+ env['PYTHONPATH'] = telemetry_dir
-if __name__ == '__main__':
- base_dir = os.path.dirname(os.path.realpath(__file__))
- progress_reporters = [
- gtest_progress_reporter.GTestProgressReporter(sys.stdout)]
- run_tests.config = run_tests.Config(base_dir, [base_dir], progress_reporters)
- sys.exit(run_tests.RunTestsCommand.main())
+ path_to_run_tests = os.path.join(telemetry_dir, 'telemetry', 'unittest_util',
+ 'run_tests.py')
+ argv = ['--top-level-dir', proxy_dir, '--path', perf_dir] + sys.argv[1:]
+ sys.exit(subprocess.call([sys.executable, path_to_run_tests] + argv, env=env))
« no previous file with comments | « no previous file | tools/perf/run_tests » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698