| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import argparse | 5 import argparse |
| 6 import os | 6 import os |
| 7 import logging | 7 import logging |
| 8 import re | 8 import re |
| 9 import subprocess | 9 import subprocess |
| 10 import urllib2 | 10 import urllib2 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 bot_platform += '-x64' | 90 bot_platform += '-x64' |
| 91 return {bot_platform: bot} | 91 return {bot_platform: bot} |
| 92 | 92 |
| 93 platform_and_bots = {} | 93 platform_and_bots = {} |
| 94 for os_name in os_names: | 94 for os_name in os_names: |
| 95 platform_and_bots[os_name] = [bot for bot in builders if os_name in bot] | 95 platform_and_bots[os_name] = [bot for bot in builders if os_name in bot] |
| 96 | 96 |
| 97 # Special case for Windows x64, consider it as separate platform | 97 # Special case for Windows x64, consider it as separate platform |
| 98 # config config should contain target_arch=x64 and --browser=release_x64. | 98 # config config should contain target_arch=x64 and --browser=release_x64. |
| 99 win_x64_bots = [ | 99 win_x64_bots = [ |
| 100 platform_and_bots['win'].pop(i) | 100 win_bot for win_bot in platform_and_bots['win'] |
| 101 for i, win_bot in enumerate(platform_and_bots['win']) | |
| 102 if 'x64' in win_bot] | 101 if 'x64' in win_bot] |
| 102 # Separate out non x64 bits win bots |
| 103 platform_and_bots['win'] = list( |
| 104 set(platform_and_bots['win']) - set(win_x64_bots)) |
| 103 platform_and_bots['win-x64'] = win_x64_bots | 105 platform_and_bots['win-x64'] = win_x64_bots |
| 104 | 106 |
| 105 if 'all-win' in trybot_name: | 107 if 'all-win' in trybot_name: |
| 106 return {'win': platform_and_bots['win'], | 108 return {'win': platform_and_bots['win'], |
| 107 'win-x64': platform_and_bots['win-x64']} | 109 'win-x64': platform_and_bots['win-x64']} |
| 108 if 'all-mac' in trybot_name: | 110 if 'all-mac' in trybot_name: |
| 109 return {'mac': platform_and_bots['mac']} | 111 return {'mac': platform_and_bots['mac']} |
| 110 if 'all-android' in trybot_name: | 112 if 'all-android' in trybot_name: |
| 111 return {'android': platform_and_bots['android']} | 113 return {'android': platform_and_bots['android']} |
| 112 if 'all-linux' in trybot_name: | 114 if 'all-linux' in trybot_name: |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 return ERROR # pylint: disable=lost-exception | 427 return ERROR # pylint: disable=lost-exception |
| 426 logging.info('Checked out original branch: %s', original_branchname) | 428 logging.info('Checked out original branch: %s', original_branchname) |
| 427 returncode, out, err = _RunProcess( | 429 returncode, out, err = _RunProcess( |
| 428 ['git', 'branch', '-D', 'telemetry-tryjob']) | 430 ['git', 'branch', '-D', 'telemetry-tryjob']) |
| 429 if returncode: | 431 if returncode: |
| 430 logging.error('Could not delete telemetry-tryjob branch. ' | 432 logging.error('Could not delete telemetry-tryjob branch. ' |
| 431 'Please delete it manually: %s', err) | 433 'Please delete it manually: %s', err) |
| 432 return ERROR # pylint: disable=lost-exception | 434 return ERROR # pylint: disable=lost-exception |
| 433 logging.info('Deleted temp branch: telemetry-tryjob') | 435 logging.info('Deleted temp branch: telemetry-tryjob') |
| 434 return SUCCESS | 436 return SUCCESS |
| OLD | NEW |