tools/code_coverage/coverage.py
def _GetBinaryPathsFromTargets(targets, build_dir):
  """Return binary paths from target names."""
  # TODO(crbug.com/899974): Derive output binary from target build definitions
  # rather than assuming that it is always the same name.
  binary_paths = []
  for target in targets:
    binary_path = os.path.join(build_dir, target)
    if coverage_utils.GetHostPlatform() == 'win':
      binary_path += '.exe'

    if os.path.exists(binary_path):
      binary_paths.append(binary_path)
    else:
      logging.warning(
          'Target binary "%s" not found in build directory, skipping.',
          os.path.basename(binary_path))

  return binary_paths
Return binary paths from target names.
Return binary paths from target names.
Return binary paths from target names .
def _GetBinaryPathsFromTargets(targets, build_dir):
  binary_paths = []
  for target in targets:
    binary_path = os.path.join(build_dir, target)
    if coverage_utils.GetHostPlatform() == 'win':
      binary_path += '.exe'
    if os.path.exists(binary_path):
      binary_paths.append(binary_path)
    else:
      logging.warning(
          'Target binary "%s" not found in build directory, skipping.',
          os.path.basename(binary_path))
  return binary_paths
def _GetBinaryPathsFromTargets ( targets , build_dir ) : binary_paths = [ ] for target in targets : binary_path = os . path . join ( build_dir , target ) if coverage_utils . GetHostPlatform ( ) == 'win' : binary_path += '.exe' if os . path . exists ( binary_path ) : binary_paths . append ( binary_path ) else : logging . warning ( 'Target binary "%s" not found in build directory, skipping.' , os . path . basename ( binary_path ) ) return binary_paths
Return binary paths from target names.
Return binary paths from target names .
"""Return binary paths from target names.""" # TODO(crbug.com/899974): Derive output binary from target build definitions # rather than assuming that it is always the same name.
targets
build_dir