summaryrefslogtreecommitdiffstats
path: root/tools/telemetry/run_tests
diff options
context:
space:
mode:
Diffstat (limited to 'tools/telemetry/run_tests')
-rwxr-xr-xtools/telemetry/run_tests21
1 files changed, 13 insertions, 8 deletions
diff --git a/tools/telemetry/run_tests b/tools/telemetry/run_tests
index eb74f68..e420b66 100755
--- a/tools/telemetry/run_tests
+++ b/tools/telemetry/run_tests
@@ -5,14 +5,19 @@
import os
import sys
-
-from telemetry.unittest_util import gtest_progress_reporter
-from telemetry.unittest_util import run_tests
+import subprocess
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())
+ 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
+ else:
+ env['PYTHONPATH'] = telemetry_dir
+
+ path_to_run_tests = os.path.join(telemetry_dir, 'telemetry', 'unittest_util',
+ '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))