| Index: presubmit_canned_checks.py
|
| diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
|
| index aeb2711451df919ab61256106b315de4bbe7b49a..607ce8c76507427c7eeb72275a1db334403cc0e8 100644
|
| --- a/presubmit_canned_checks.py
|
| +++ b/presubmit_canned_checks.py
|
| @@ -477,7 +477,9 @@ def RunUnitTestsInDirectory(
|
| def check(filename, filters):
|
| return any(True for i in filters if input_api.re.match(i, filename))
|
|
|
| + to_run = found = 0
|
| for filename in input_api.os_listdir(test_path):
|
| + found += 1
|
| fullpath = input_api.os_path.join(test_path, filename)
|
| if not input_api.os_path.isfile(fullpath):
|
| continue
|
| @@ -486,6 +488,14 @@ def RunUnitTestsInDirectory(
|
| if blacklist and check(filename, blacklist):
|
| continue
|
| unit_tests.append(input_api.os_path.join(directory, filename))
|
| + to_run += 1
|
| + input_api.logging.debug('Found %d files, running %d' % (found, to_run))
|
| + if not to_run:
|
| + return [
|
| + output_api.PresubmitPromptWarning(
|
| + 'Out of %d files, found none that matched w=%r, b=%r in directory %s'
|
| + % (found, whitelist, blacklist, directory))
|
| + ]
|
| return RunUnitTests(input_api, output_api, unit_tests)
|
|
|
|
|
|
|