| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 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 """Run Performance Test Bisect Tool | 6 """Run Performance Test Bisect Tool |
| 7 | 7 |
| 8 This script is used by a try bot to run the bisect script with the parameters | 8 This script is used by a try bot to run the bisect script with the parameters |
| 9 specified in the bisect config file. It checks out a copy of the depot in | 9 specified in the bisect config file. It checks out a copy of the depot in |
| 10 a subdirectory 'bisect' of the working directory provided, annd runs the | 10 a subdirectory 'bisect' of the working directory provided, annd runs the |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 opts_dict['truncate_percent'] = int(config['truncate_percent']) | 200 opts_dict['truncate_percent'] = int(config['truncate_percent']) |
| 201 | 201 |
| 202 if config['max_time_minutes']: | 202 if config['max_time_minutes']: |
| 203 opts_dict['max_time_minutes'] = int(config['max_time_minutes']) | 203 opts_dict['max_time_minutes'] = int(config['max_time_minutes']) |
| 204 | 204 |
| 205 if config.has_key('use_goma'): | 205 if config.has_key('use_goma'): |
| 206 opts_dict['use_goma'] = config['use_goma'] | 206 opts_dict['use_goma'] = config['use_goma'] |
| 207 if config.has_key('goma_dir'): | 207 if config.has_key('goma_dir'): |
| 208 opts_dict['goma_dir'] = config['goma_dir'] | 208 opts_dict['goma_dir'] = config['goma_dir'] |
| 209 | 209 |
| 210 if config.has_key('improvement_direction'): |
| 211 opts_dict['improvement_direction'] = int(config['improvement_direction']) |
| 212 |
| 210 opts_dict['build_preference'] = 'ninja' | 213 opts_dict['build_preference'] = 'ninja' |
| 211 opts_dict['output_buildbot_annotations'] = True | 214 opts_dict['output_buildbot_annotations'] = True |
| 212 | 215 |
| 213 if '--browser=cros' in config['command']: | 216 if '--browser=cros' in config['command']: |
| 214 opts_dict['target_platform'] = 'cros' | 217 opts_dict['target_platform'] = 'cros' |
| 215 | 218 |
| 216 if os.environ[CROS_BOARD_ENV] and os.environ[CROS_IP_ENV]: | 219 if os.environ[CROS_BOARD_ENV] and os.environ[CROS_IP_ENV]: |
| 217 opts_dict['cros_board'] = os.environ[CROS_BOARD_ENV] | 220 opts_dict['cros_board'] = os.environ[CROS_BOARD_ENV] |
| 218 opts_dict['cros_remote_ip'] = os.environ[CROS_IP_ENV] | 221 opts_dict['cros_remote_ip'] = os.environ[CROS_IP_ENV] |
| 219 else: | 222 else: |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 | 399 |
| 397 if config['truncate_percent']: | 400 if config['truncate_percent']: |
| 398 cmd.extend(['-t', config['truncate_percent']]) | 401 cmd.extend(['-t', config['truncate_percent']]) |
| 399 | 402 |
| 400 if config['max_time_minutes']: | 403 if config['max_time_minutes']: |
| 401 cmd.extend(['--max_time_minutes', config['max_time_minutes']]) | 404 cmd.extend(['--max_time_minutes', config['max_time_minutes']]) |
| 402 | 405 |
| 403 if config.has_key('bisect_mode'): | 406 if config.has_key('bisect_mode'): |
| 404 cmd.extend(['--bisect_mode', config['bisect_mode']]) | 407 cmd.extend(['--bisect_mode', config['bisect_mode']]) |
| 405 | 408 |
| 409 if config.has_key('improvement_direction'): |
| 410 cmd.extend(['-d', config['improvement_direction']]) |
| 411 |
| 406 cmd.extend(['--build_preference', 'ninja']) | 412 cmd.extend(['--build_preference', 'ninja']) |
| 407 | 413 |
| 408 if '--browser=cros' in config['command']: | 414 if '--browser=cros' in config['command']: |
| 409 cmd.extend(['--target_platform', 'cros']) | 415 cmd.extend(['--target_platform', 'cros']) |
| 410 | 416 |
| 411 if os.environ[CROS_BOARD_ENV] and os.environ[CROS_IP_ENV]: | 417 if os.environ[CROS_BOARD_ENV] and os.environ[CROS_IP_ENV]: |
| 412 cmd.extend(['--cros_board', os.environ[CROS_BOARD_ENV]]) | 418 cmd.extend(['--cros_board', os.environ[CROS_BOARD_ENV]]) |
| 413 cmd.extend(['--cros_remote_ip', os.environ[CROS_IP_ENV]]) | 419 cmd.extend(['--cros_remote_ip', os.environ[CROS_IP_ENV]]) |
| 414 else: | 420 else: |
| 415 print ('Error: Cros build selected, but BISECT_CROS_IP or' | 421 print ('Error: Cros build selected, but BISECT_CROS_IP or' |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 if config and config_is_valid: | 563 if config and config_is_valid: |
| 558 return _SetupAndRunPerformanceTest(config, opts.path_to_goma) | 564 return _SetupAndRunPerformanceTest(config, opts.path_to_goma) |
| 559 | 565 |
| 560 print ('Error: Could not load config file. Double check your changes to ' | 566 print ('Error: Could not load config file. Double check your changes to ' |
| 561 'auto_bisect/bisect.cfg or run-perf-test.cfg for syntax errors.\n') | 567 'auto_bisect/bisect.cfg or run-perf-test.cfg for syntax errors.\n') |
| 562 return 1 | 568 return 1 |
| 563 | 569 |
| 564 | 570 |
| 565 if __name__ == '__main__': | 571 if __name__ == '__main__': |
| 566 sys.exit(main()) | 572 sys.exit(main()) |
| OLD | NEW |