Chromium Code Reviews| Index: chrome/browser/resources/PRESUBMIT.py |
| diff --git a/chrome/browser/resources/PRESUBMIT.py b/chrome/browser/resources/PRESUBMIT.py |
| index 292836a15b5e832f6bdcfb95e8110f2ab67a3b25..0f7f4b5a748726c8f8eb3f2743c39db3615513ca 100644 |
| --- a/chrome/browser/resources/PRESUBMIT.py |
| +++ b/chrome/browser/resources/PRESUBMIT.py |
| @@ -25,11 +25,19 @@ def _CommonChecks(input_api, output_api): |
| resources = input_api.PresubmitLocalPath() |
| path = input_api.os_path |
| - presubmit = path.join(resources, 'PRESUBMIT.py') |
| - if presubmit in (f.AbsoluteLocalPath() for f in input_api.AffectedFiles()): |
| - tests = [path.join(resources, 'test_presubmit.py')] |
| - results.extend( |
| - input_api.canned_checks.RunUnitTests(input_api, output_api, tests)) |
| + would_affect_tests = ( |
| + path.join(resources, 'PRESUBMIT.py'), |
| + path.join(resources, 'test_presubmit.py'), |
| + path.join(resources, 'web_dev_style', 'css_checker.py'), |
| + path.join(resources, 'web_dev_style', 'js_checker.py'), |
| + ) |
| + affected_files = (f.AbsoluteLocalPath() for f in input_api.AffectedFiles()) |
| + for presubmit in would_affect_tests: |
|
Tyler Breisacher (Chromium)
2012/03/21 20:19:55
I think there might be a nicer way to express this
Dan Beam
2012/03/21 20:44:50
Done.
|
| + if presubmit in affected_files: |
| + tests = [path.join(resources, 'test_presubmit.py')] |
| + results.extend( |
| + input_api.canned_checks.RunUnitTests(input_api, output_api, tests)) |
| + break |
| import sys |
| old_path = sys.path |