| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 import os | 6 import os |
| 7 import re | 7 import re |
| 8 import subprocess | 8 import subprocess |
| 9 import sys | 9 import sys |
| 10 | 10 |
| 11 from gpu_tests import path_util | 11 from gpu_tests import path_util |
| 12 path_util.AddDirToPathIfNeeded(path_util.GetChromiumSrcDir(), 'tools', | 12 |
| 13 'telemetry') | 13 path_util.SetupTelemetryPaths() |
| 14 | 14 |
| 15 from telemetry import benchmark_runner | 15 from telemetry import benchmark_runner |
| 16 | 16 |
| 17 import gpu_project_config | 17 import gpu_project_config |
| 18 | 18 |
| 19 | 19 |
| 20 def _LaunchDBus(): | 20 def _LaunchDBus(): |
| 21 """Launches DBus to work around a bug in GLib. | 21 """Launches DBus to work around a bug in GLib. |
| 22 | 22 |
| 23 Works around a bug in GLib where it performs operations which aren't | 23 Works around a bug in GLib where it performs operations which aren't |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 if __name__ == '__main__': | 89 if __name__ == '__main__': |
| 90 did_launch_dbus = _LaunchDBus() | 90 did_launch_dbus = _LaunchDBus() |
| 91 try: | 91 try: |
| 92 retcode = benchmark_runner.main(gpu_project_config.CONFIG) | 92 retcode = benchmark_runner.main(gpu_project_config.CONFIG) |
| 93 finally: | 93 finally: |
| 94 if did_launch_dbus: | 94 if did_launch_dbus: |
| 95 _ShutdownDBus() | 95 _ShutdownDBus() |
| 96 | 96 |
| 97 sys.exit(retcode) | 97 sys.exit(retcode) |
| OLD | NEW |