| OLD | NEW |
| 1 # Copyright 2013 The LUCI Authors. All rights reserved. | 1 # Copyright 2013 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed under the Apache License, Version 2.0 | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # that can be found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
| 4 | 4 |
| 5 """Top-level presubmit script for appengine/components/. | 5 """Top-level presubmit script for appengine/components/. |
| 6 | 6 |
| 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for | 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for |
| 8 details on the presubmit API built into gcl. | 8 details on the presubmit API built into gcl. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 black_list=black_list, | 57 black_list=black_list, |
| 58 disabled_warnings=disabled_warnings)) | 58 disabled_warnings=disabled_warnings)) |
| 59 finally: | 59 finally: |
| 60 sys.path = old_sys_path | 60 sys.path = old_sys_path |
| 61 | 61 |
| 62 # Add the commented out directories when adding tests. | 62 # Add the commented out directories when adding tests. |
| 63 test_directories = [ | 63 test_directories = [ |
| 64 join('components'), | 64 join('components'), |
| 65 join('components', 'auth'), | 65 join('components', 'auth'), |
| 66 join('components', 'auth', 'ui'), | 66 join('components', 'auth', 'ui'), |
| 67 join('components', 'config'), |
| 67 join('components', 'datastore_utils'), | 68 join('components', 'datastore_utils'), |
| 68 join('components', 'ereporter2'), | 69 join('components', 'ereporter2'), |
| 69 ] | 70 ] |
| 70 blacklist = [] | 71 blacklist = [] |
| 71 if not input_api.is_committing: | 72 if not input_api.is_committing: |
| 72 # Skip smoke tests on upload. | 73 # Skip smoke tests on upload. |
| 73 blacklist.append(r'.+_smoke_test\.py$') | 74 blacklist.append(r'.+_smoke_test\.py$') |
| 74 else: | 75 else: |
| 75 # 'tests' contains only smoke tests. Add it only when committing (otherwise | 76 # 'tests' contains only smoke tests. Add it only when committing (otherwise |
| 76 # depot_tools emits warning "Out of 4 files, found none that matched ..."). | 77 # depot_tools emits warning "Out of 4 files, found none that matched ..."). |
| (...skipping 10 matching lines...) Expand all Loading... |
| 87 output.extend(input_api.RunTests(tests, parallel=True)) | 88 output.extend(input_api.RunTests(tests, parallel=True)) |
| 88 return output | 89 return output |
| 89 | 90 |
| 90 | 91 |
| 91 def CheckChangeOnUpload(input_api, output_api): | 92 def CheckChangeOnUpload(input_api, output_api): |
| 92 return CommonChecks(input_api, output_api) | 93 return CommonChecks(input_api, output_api) |
| 93 | 94 |
| 94 | 95 |
| 95 def CheckChangeOnCommit(input_api, output_api): | 96 def CheckChangeOnCommit(input_api, output_api): |
| 96 return CommonChecks(input_api, output_api) | 97 return CommonChecks(input_api, output_api) |
| OLD | NEW |