| 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 """Determines support level for different steps for masters.""" | 5 """Determines support level for different steps for masters.""" |
| 6 | 6 |
| 7 from model.wf_config import FinditConfig | 7 from model.wf_config import FinditConfig |
| 8 | 8 |
| 9 # Explicitly list unsupported masters. Additional work might be needed in order | 9 # Explicitly list unsupported masters. Additional work might be needed in order |
| 10 # to support them. | 10 # to support them. |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 return trybot_config.get('mastername'), trybot_config.get('buildername') | 130 return trybot_config.get('mastername'), trybot_config.get('buildername') |
| 131 | 131 |
| 132 | 132 |
| 133 def EnableStrictRegexForCompileLinkFailures(wf_mastername, wf_buildername): | 133 def EnableStrictRegexForCompileLinkFailures(wf_mastername, wf_buildername): |
| 134 """Returns True if strict regex should be used for the given builder.""" | 134 """Returns True if strict regex should be used for the given builder.""" |
| 135 trybot_config = FinditConfig.Get().builders_to_trybots.get( | 135 trybot_config = FinditConfig.Get().builders_to_trybots.get( |
| 136 wf_mastername, {}).get(wf_buildername, {}) | 136 wf_mastername, {}).get(wf_buildername, {}) |
| 137 return trybot_config.get('strict_regex', False) | 137 return trybot_config.get('strict_regex', False) |
| 138 | 138 |
| 139 | 139 |
| 140 def ShouldSkipTestTryJobs(wf_mastername, wf_buildername): |
| 141 """Returns True if test try jobs should be triggered. |
| 142 |
| 143 By default, test try jobs should be supported unless the master/builder |
| 144 specifies to bail out. |
| 145 |
| 146 Args: |
| 147 wf_mastername: The mastername of a waterfall builder. |
| 148 wf_buildername: The buildername of a waterfall builder. |
| 149 |
| 150 Returns: |
| 151 True if test try jobs are to be skipped, False otherwise. |
| 152 """ |
| 153 trybot_config = FinditConfig.Get().builders_to_trybots.get( |
| 154 wf_mastername, {}).get(wf_buildername, {}) |
| 155 return trybot_config.get('not_run_tests', False) |
| 156 |
| 157 |
| 140 def GetTryJobSettings(): | 158 def GetTryJobSettings(): |
| 141 return FinditConfig().Get().try_job_settings | 159 return FinditConfig().Get().try_job_settings |
| 142 | 160 |
| 143 | 161 |
| 144 def GetSwarmingSettings(): | 162 def GetSwarmingSettings(): |
| 145 return FinditConfig().Get().swarming_settings | 163 return FinditConfig().Get().swarming_settings |
| OLD | NEW |