MCPcopy Index your code
hub / github.com/nodejs/node / _GetStatusFiles

Method _GetStatusFiles

deps/v8/tools/v8_presubmit.py:752–780  ·  view source on GitHub ↗
(self, files)

Source from the content-addressed store, hash-verified

750 return success
751
752 def _GetStatusFiles(self, files):
753 test_path = join(dirname(TOOLS_PATH), 'test')
754 testrunner_path = join(TOOLS_PATH, 'testrunner')
755 status_files = set()
756
757 for file_path in files:
758 if file_path.startswith(testrunner_path):
759 for suitepath in os.listdir(test_path):
760 suitename = basename(suitepath)
761 status_file = join(
762 test_path, suitename, suitename + ".status")
763 if exists(status_file):
764 status_files.add(status_file)
765 return status_files
766
767 for file_path in files:
768 if file_path.startswith(test_path):
769 # Strip off absolute path prefix pointing to test suites.
770 pieces = file_path[len(test_path):].lstrip(os.sep).split(os.sep)
771 if pieces:
772 # Infer affected status file name. Only care for existing status
773 # files. Some directories under "test" don't have any.
774 if not isdir(join(test_path, pieces[0])):
775 continue
776 status_file = join(test_path, pieces[0], pieces[0] + ".status")
777 if not exists(status_file):
778 continue
779 status_files.add(status_file)
780 return status_files
781
782
783class GCMoleProcessor(SourceFileProcessor):

Callers 1

ProcessFilesMethod · 0.95

Calls 7

joinFunction · 0.90
dirnameFunction · 0.90
basenameFunction · 0.90
existsFunction · 0.85
addMethod · 0.65
setFunction · 0.50
splitMethod · 0.45

Tested by

no test coverage detected