Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 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 """This module fetches and prints the dependencies given a benchmark.""" | 6 """This module fetches and prints the dependencies given a benchmark.""" |
| 7 | 7 |
| 8 import os | 8 import os |
| 9 import sys | 9 import sys |
| 10 | 10 |
| 11 sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'telemetry')) | 11 from chrome_telemetry_build import chromium_config |
| 12 sys.path.insert(1, chromium_config.GetTelemetryDir()) | |
| 12 | 13 |
| 13 from catapult_base import cloud_storage | 14 from catapult_base import cloud_storage |
| 15 | |
|
aiolos (Not reviewing)
2016/01/15 00:33:04
catapult_base and telemetry are arguably the same
eakuefner
2016/01/19 17:21:18
Outside of Catapult, these are all just third-part
| |
| 14 from telemetry import benchmark_runner | 16 from telemetry import benchmark_runner |
| 15 | 17 |
| 16 | 18 |
| 17 def _GetPerfDir(*subdirs): | 19 def _GetPerfDir(*subdirs): |
| 18 perf_dir = os.path.realpath(os.path.dirname(__file__)) | 20 perf_dir = os.path.realpath(os.path.dirname(__file__)) |
| 19 return os.path.join(perf_dir, *subdirs) | 21 return os.path.join(perf_dir, *subdirs) |
| 20 | 22 |
| 21 | 23 |
| 22 def GetChromiumDir(): | 24 def GetChromiumDir(): |
| 23 return _GetPerfDir(os.path.pardir, os.path.pardir, os.path.pardir) | 25 return _GetPerfDir(os.path.pardir, os.path.pardir, os.path.pardir) |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 deps = _EnumerateDependencies(story_set) | 87 deps = _EnumerateDependencies(story_set) |
| 86 for dep in deps: | 88 for dep in deps: |
| 87 print >> output, dep | 89 print >> output, dep |
| 88 | 90 |
| 89 | 91 |
| 90 if __name__ == '__main__': | 92 if __name__ == '__main__': |
| 91 if len(sys.argv) != 2 or sys.argv[1][0] == '-': | 93 if len(sys.argv) != 2 or sys.argv[1][0] == '-': |
| 92 _show_usage() | 94 _show_usage() |
| 93 else: | 95 else: |
| 94 main() | 96 main() |
| OLD | NEW |