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
4 # found in the LICENSE file.
11 if __name__
== '__main__':
12 telemetry_dir
= os
.path
.dirname(os
.path
.realpath(__file__
))
14 env
= os
.environ
.copy()
15 if 'PYTHONPATH' in env
:
16 env
['PYTHONPATH'] = env
['PYTHONPATH'] + os
.pathsep
+ telemetry_dir
18 env
['PYTHONPATH'] = telemetry_dir
20 path_to_run_tests
= os
.path
.join(telemetry_dir
, 'telemetry', 'unittest_util',
22 argv
= ['--top-level-dir', telemetry_dir
] + sys
.argv
[1:]
23 sys
.exit(subprocess
.call([sys
.executable
, path_to_run_tests
] + argv
, env
=env
))