| OLD | NEW |
| 1 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 1 # Copyright (c) 2012 The Native Client 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 # Documentation on PRESUBMIT.py can be found at: | 5 # Documentation on PRESUBMIT.py can be found at: |
| 6 # http://www.chromium.org/developers/how-tos/depottools/presubmit-scripts | 6 # http://www.chromium.org/developers/how-tos/depottools/presubmit-scripts |
| 7 | 7 |
| 8 import os | 8 import os |
| 9 import subprocess | 9 import subprocess |
| 10 import sys | 10 import sys |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 'nacl-toolchain-mac-newlib-arm', | 190 'nacl-toolchain-mac-newlib-arm', |
| 191 ] + PNACL_TOOLCHAIN_TRYBOTS | 191 ] + PNACL_TOOLCHAIN_TRYBOTS |
| 192 | 192 |
| 193 | 193 |
| 194 def GetPreferredTryMasters(_, change): | 194 def GetPreferredTryMasters(_, change): |
| 195 | 195 |
| 196 has_pnacl = False | 196 has_pnacl = False |
| 197 has_toolchain_build = False | 197 has_toolchain_build = False |
| 198 has_others = False | 198 has_others = False |
| 199 | 199 |
| 200 for file in change.AffectedFiles(include_dirs=True): | 200 for file in change.AffectedFiles(): |
| 201 if IsFileInDirectories(file.AbsoluteLocalPath(), | 201 if IsFileInDirectories(file.AbsoluteLocalPath(), |
| 202 [os.path.join(NACL_TOP_DIR, 'build'), | 202 [os.path.join(NACL_TOP_DIR, 'build'), |
| 203 os.path.join(NACL_TOP_DIR, 'buildbot'), | 203 os.path.join(NACL_TOP_DIR, 'buildbot'), |
| 204 os.path.join(NACL_TOP_DIR, 'pynacl')]): | 204 os.path.join(NACL_TOP_DIR, 'pynacl')]): |
| 205 # Buildbot and infrastructure changes should trigger all the try bots. | 205 # Buildbot and infrastructure changes should trigger all the try bots. |
| 206 has_pnacl = True | 206 has_pnacl = True |
| 207 has_toolchain_build = True | 207 has_toolchain_build = True |
| 208 has_others = True | 208 has_others = True |
| 209 break | 209 break |
| 210 elif IsFileInDirectories(file.AbsoluteLocalPath(), | 210 elif IsFileInDirectories(file.AbsoluteLocalPath(), |
| 211 [os.path.join(NACL_TOP_DIR, 'pnacl')]): | 211 [os.path.join(NACL_TOP_DIR, 'pnacl')]): |
| 212 has_pnacl = True | 212 has_pnacl = True |
| 213 elif IsFileInDirectories(file.AbsoluteLocalPath(), | 213 elif IsFileInDirectories(file.AbsoluteLocalPath(), |
| 214 [os.path.join(NACL_TOP_DIR, 'toolchain_build')]): | 214 [os.path.join(NACL_TOP_DIR, 'toolchain_build')]): |
| 215 has_toolchain_build = True | 215 has_toolchain_build = True |
| 216 else: | 216 else: |
| 217 has_others = True | 217 has_others = True |
| 218 | 218 |
| 219 trybots = [] | 219 trybots = [] |
| 220 if has_pnacl: | 220 if has_pnacl: |
| 221 trybots += PNACL_TOOLCHAIN_TRYBOTS | 221 trybots += PNACL_TOOLCHAIN_TRYBOTS |
| 222 if has_toolchain_build: | 222 if has_toolchain_build: |
| 223 trybots += TOOLCHAIN_BUILD_TRYBOTS | 223 trybots += TOOLCHAIN_BUILD_TRYBOTS |
| 224 if has_others: | 224 if has_others: |
| 225 trybots += DEFAULT_TRYBOTS | 225 trybots += DEFAULT_TRYBOTS |
| 226 | 226 |
| 227 return { | 227 return { |
| 228 'tryserver.nacl': { t: set(['defaulttests']) for t in set(trybots) }, | 228 'tryserver.nacl': { t: set(['defaulttests']) for t in set(trybots) }, |
| 229 } | 229 } |
| OLD | NEW |