tools/code_coverage/coverage_utils.py
def _ExtractComponentToDirectoriesMapping(self, component_mappings):
    """Initializes a mapping from components to directories."""
    directory_to_component = component_mappings['dir-to-component']

    self.component_to_directories = defaultdict(list)
    for directory in sorted(directory_to_component):
      component = directory_to_component[directory]

      # Check if we already added the parent directory of this directory. If
      # yes,skip this sub-directory to avoid double-counting.
      found_parent_directory = False
      for component_directory in self.component_to_directories[component]:
        if directory.startswith(component_directory + '/'):
          found_parent_directory = True
          break

      if not found_parent_directory:
        self.component_to_directories[component].append(directory)
Initializes a mapping from components to directories.
Initializes a mapping from components to directories.
Initializes a mapping from components to directories .
def _ExtractComponentToDirectoriesMapping(self, component_mappings):
    directory_to_component = component_mappings['dir-to-component']
    self.component_to_directories = defaultdict(list)
    for directory in sorted(directory_to_component):
      component = directory_to_component[directory]
      found_parent_directory = False
      for component_directory in self.component_to_directories[component]:
        if directory.startswith(component_directory + '/'):
          found_parent_directory = True
          break
      if not found_parent_directory:
        self.component_to_directories[component].append(directory)
def _ExtractComponentToDirectoriesMapping ( self , component_mappings ) : directory_to_component = component_mappings [ 'dir-to-component' ] self . component_to_directories = defaultdict ( list ) for directory in sorted ( directory_to_component ) : component = directory_to_component [ directory ] found_parent_directory = False for component_directory in self . component_to_directories [ component ] : if directory . startswith ( component_directory + '/' ) : found_parent_directory = True break if not found_parent_directory : self . component_to_directories [ component ] . append ( directory )
Initializes a mapping from components to directories.
Initializes a mapping from components to directories .
"""Initializes a mapping from components to directories.""" # Check if we already added the parent directory of this directory. If # yes,skip this sub-directory to avoid double-counting.
self
component_mappings