diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py index 2b63cc194..d6434ede5 100644 --- a/presubmit_canned_checks.py +++ b/presubmit_canned_checks.py @@ -525,7 +525,8 @@ def GetUnitTestsInDirectory( 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)) + input_api.logging.debug('Found %d files, running %d unit tests' + % (found, to_run)) if not to_run: return [ output_api.PresubmitPromptWarning( @@ -675,6 +676,9 @@ def _FetchAllFiles(input_api, white_list, black_list): # can break another unmodified file. # Use code similar to InputApi.FilterSourceFile() def Find(filepath, filters): + if input_api.platform == 'win32': + filepath = filepath.replace('\\', '/') + for item in filters: if input_api.re.match(item, filepath): return True diff --git a/tests/presubmit_unittest.py b/tests/presubmit_unittest.py index 47ae63f93..9bc10476f 100755 --- a/tests/presubmit_unittest.py +++ b/tests/presubmit_unittest.py @@ -2627,7 +2627,7 @@ class CannedChecksUnittest(PresubmitTestsBase): input_api, [presubmit.os.path.join('random_directory', 'b'), '--verbose'], cwd=self.fake_root_dir) - input_api.logging.debug('Found 5 files, running 1') + input_api.logging.debug('Found 5 files, running 1 unit tests') self.mox.ReplayAll() results = presubmit_canned_checks.RunUnitTestsInDirectory(