Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2012 The LUCI Authors. All rights reserved. | 1 # Copyright 2012 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 swarm_client. | 5 """Top-level presubmit script for swarm_client. |
| 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 26 matching lines...) Expand all Loading... | |
| 37 # Remove all slow tests, e.g. the ones that take >1s to complete. | 37 # Remove all slow tests, e.g. the ones that take >1s to complete. |
| 38 blacklist.extend([ | 38 blacklist.extend([ |
| 39 r'.*isolate_smoke_test\.py$', | 39 r'.*isolate_smoke_test\.py$', |
| 40 r'.*trace_inputs_smoke_test\.py$', | 40 r'.*trace_inputs_smoke_test\.py$', |
| 41 r'.*url_open_timeout_test\.py$', | 41 r'.*url_open_timeout_test\.py$', |
| 42 ]) | 42 ]) |
| 43 | 43 |
| 44 unit_tests = input_api.canned_checks.GetUnitTestsRecursively( | 44 unit_tests = input_api.canned_checks.GetUnitTestsRecursively( |
| 45 input_api, output_api, | 45 input_api, output_api, |
| 46 input_api.os_path.join(input_api.PresubmitLocalPath()), | 46 input_api.os_path.join(input_api.PresubmitLocalPath()), |
| 47 whitelist=[r'.+_test\.py$'], | 47 whitelist=[ |
| 48 r'.+_test\.py$', | |
| 49 r'.*tests\.py$', | |
|
M-A Ruel
2016/06/22 14:21:31
Please rename test instead of creating a one-off
mithro
2016/06/23 07:10:54
Done.
| |
| 50 ], | |
| 48 blacklist=blacklist) | 51 blacklist=blacklist) |
| 49 output.extend(input_api.RunTests(unit_tests)) | 52 output.extend(input_api.RunTests(unit_tests)) |
| 50 return output | 53 return output |
| 51 | 54 |
| 52 | 55 |
| 53 def CheckChangeOnUpload(input_api, output_api): | 56 def CheckChangeOnUpload(input_api, output_api): |
| 54 return CommonChecks(input_api, output_api) | 57 return CommonChecks(input_api, output_api) |
| 55 | 58 |
| 56 | 59 |
| 57 def CheckChangeOnCommit(input_api, output_api): | 60 def CheckChangeOnCommit(input_api, output_api): |
| 58 return CommonChecks(input_api, output_api) | 61 return CommonChecks(input_api, output_api) |
| OLD | NEW |