| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 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 """A tool to run the playback tests, used by the buildbot slaves. | 6 """A tool to run the playback tests, used by the buildbot slaves. |
| 7 | 7 |
| 8 When this is run, the current directory (cwd) should be the outer build | 8 When this is run, the current directory (cwd) should be the outer build |
| 9 directory (e.g., chrome-release/build/). | 9 directory (e.g., chrome-release/build/). |
| 10 | 10 |
| 11 For a list of command-line options, call this script with '--help'. | 11 For a list of command-line options, call this script with '--help'. |
| 12 """ | 12 """ |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 | 46 |
| 47 def run_benchmark(options, use_refbuild, benchmark_results): | 47 def run_benchmark(options, use_refbuild, benchmark_results): |
| 48 result = 0 | 48 result = 0 |
| 49 | 49 |
| 50 build_dir = os.path.abspath(options.build_dir) | 50 build_dir = os.path.abspath(options.build_dir) |
| 51 if not use_refbuild: | 51 if not use_refbuild: |
| 52 if chromium_utils.IsMac(): | 52 if chromium_utils.IsMac(): |
| 53 build_dir = os.path.join(os.path.dirname(build_dir), 'xcodebuild') | 53 build_dir = os.path.join(os.path.dirname(build_dir), 'xcodebuild') |
| 54 elif chromium_utils.IsLinux(): | 54 elif chromium_utils.IsLinux(): |
| 55 build_dir = os.path.join(os.path.dirname(build_dir), 'out') | 55 build_dir = os.path.join(os.path.dirname(build_dir), 'sconsbuild') |
| 56 build_dir = os.path.join(build_dir, options.target) | 56 build_dir = os.path.join(build_dir, options.target) |
| 57 else: | 57 else: |
| 58 build_dir = os.path.join(os.path.dirname(build_dir), 'chrome', 'tools', | 58 build_dir = os.path.join(os.path.dirname(build_dir), 'chrome', 'tools', |
| 59 'test', 'reference_build') | 59 'test', 'reference_build') |
| 60 if chromium_utils.IsMac(): | 60 if chromium_utils.IsMac(): |
| 61 build_dir = os.path.join(build_dir, 'chrome_mac') | 61 build_dir = os.path.join(build_dir, 'chrome_mac') |
| 62 elif chromium_utils.IsLinux(): | 62 elif chromium_utils.IsLinux(): |
| 63 build_dir = os.path.join(build_dir, 'chrome_linux') | 63 build_dir = os.path.join(build_dir, 'chrome_linux') |
| 64 else: | 64 else: |
| 65 build_dir = os.path.join(build_dir, 'chrome') | 65 build_dir = os.path.join(build_dir, 'chrome') |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 help='build target (Debug or Release)') | 145 help='build target (Debug or Release)') |
| 146 option_parser.add_option('', '--build-dir', default='chrome', | 146 option_parser.add_option('', '--build-dir', default='chrome', |
| 147 help='path to main build directory (the parent of ' | 147 help='path to main build directory (the parent of ' |
| 148 'the Release or Debug directory)') | 148 'the Release or Debug directory)') |
| 149 options, args = option_parser.parse_args() | 149 options, args = option_parser.parse_args() |
| 150 return playback_benchmark(options, args) | 150 return playback_benchmark(options, args) |
| 151 | 151 |
| 152 | 152 |
| 153 if '__main__' == __name__: | 153 if '__main__' == __name__: |
| 154 sys.exit(main()) | 154 sys.exit(main()) |
| OLD | NEW |