| 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 dom perf tests, used by the buildbot slaves. | 6 """A tool to run the dom perf 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 """Using the target build configuration, run the dom perf test.""" | 75 """Using the target build configuration, run the dom perf test.""" |
| 76 | 76 |
| 77 build_dir = os.path.abspath(options.build_dir) | 77 build_dir = os.path.abspath(options.build_dir) |
| 78 if chromium_utils.IsWindows(): | 78 if chromium_utils.IsWindows(): |
| 79 test_exe_name = 'performance_ui_tests.exe' | 79 test_exe_name = 'performance_ui_tests.exe' |
| 80 else: | 80 else: |
| 81 test_exe_name = 'performance_ui_tests' | 81 test_exe_name = 'performance_ui_tests' |
| 82 if chromium_utils.IsMac(): | 82 if chromium_utils.IsMac(): |
| 83 build_dir = os.path.join(os.path.dirname(build_dir), 'xcodebuild') | 83 build_dir = os.path.join(os.path.dirname(build_dir), 'xcodebuild') |
| 84 elif chromium_utils.IsLinux(): | 84 elif chromium_utils.IsLinux(): |
| 85 build_dir = os.path.join(os.path.dirname(build_dir), 'out') | 85 build_dir = os.path.join(os.path.dirname(build_dir), 'sconsbuild') |
| 86 slave_utils.StartVirtualX(options.target, | 86 slave_utils.StartVirtualX(options.target, |
| 87 os.path.join(build_dir, options.target)) | 87 os.path.join(build_dir, options.target)) |
| 88 test_exe_path = os.path.join(build_dir, options.target, test_exe_name) | 88 test_exe_path = os.path.join(build_dir, options.target, test_exe_name) |
| 89 if not os.path.exists(test_exe_path): | 89 if not os.path.exists(test_exe_path): |
| 90 raise chromium_utils.PathNotFound('Unable to find %s' % test_exe_path) | 90 raise chromium_utils.PathNotFound('Unable to find %s' % test_exe_path) |
| 91 | 91 |
| 92 # Find the current revision to pass to the test. | 92 # Find the current revision to pass to the test. |
| 93 build_revision = slave_utils.SubversionRevision(build_dir) | 93 build_revision = slave_utils.SubversionRevision(build_dir) |
| 94 | 94 |
| 95 # Compute the path to the test data. | 95 # Compute the path to the test data. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 option_parser.add_option('', '--target', default='Release', | 167 option_parser.add_option('', '--target', default='Release', |
| 168 help='build target (Debug or Release)') | 168 help='build target (Debug or Release)') |
| 169 option_parser.add_option('', '--build-dir', default='chrome', | 169 option_parser.add_option('', '--build-dir', default='chrome', |
| 170 help='path to main build directory (the parent of ' | 170 help='path to main build directory (the parent of ' |
| 171 'the Release or Debug directory)') | 171 'the Release or Debug directory)') |
| 172 options, args = option_parser.parse_args() | 172 options, args = option_parser.parse_args() |
| 173 return dom_perf(options, args) | 173 return dom_perf(options, args) |
| 174 | 174 |
| 175 if '__main__' == __name__: | 175 if '__main__' == __name__: |
| 176 sys.exit(main()) | 176 sys.exit(main()) |
| OLD | NEW |