| OLD | NEW |
| 1 # Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import os | 5 import os |
| 6 import sys | 6 import sys |
| 7 | 7 |
| 8 sys.path.append(os.path.join( | 8 |
| 9 os.path.dirname(__file__), os.pardir, os.pardir, 'telemetry')) | 9 THIS_DIR = os.path.dirname(os.path.abspath(__file__)) |
| 10 TOP_LEVEL_DIR = os.path.normpath(os.path.join(THIS_DIR, os.pardir)) |
| 11 TELEMETRY_DIR = os.path.normpath(os.path.join( |
| 12 TOP_LEVEL_DIR, os.pardir, 'telemetry')) |
| 13 |
| 14 sys.path.append(TELEMETRY_DIR) |
| 10 from telemetry import benchmark_runner | 15 from telemetry import benchmark_runner |
| 11 | 16 |
| 12 top_level_dir = os.path.dirname(os.path.realpath( | 17 binary_dependencies_file = os.path.join(THIS_DIR, 'binary_dependencies.json') |
| 13 os.path.join(__file__, os.pardir))) | |
| 14 | 18 |
| 15 config = benchmark_runner.ProjectConfig( | 19 config = benchmark_runner.ProjectConfig( |
| 16 top_level_dir=top_level_dir, | 20 top_level_dir=TOP_LEVEL_DIR, |
| 17 benchmark_dirs=[os.path.join(top_level_dir, 'benchmarks')]) | 21 benchmark_dirs=[os.path.join(TOP_LEVEL_DIR, 'benchmarks')], |
| 22 client_config=binary_dependencies_file) |
| 18 | 23 |
| 19 config.telemetry_dir = os.path.realpath(os.path.join( | 24 config.telemetry_dir = TELEMETRY_DIR |
| 20 top_level_dir, os.pardir, 'telemetry')) | |
| 21 | 25 |
| OLD | NEW |