tools/code_coverage/coverage.py
def _ExecuteIOSCommand(command, output_file_path):
  """Runs a single iOS command and generates a profraw data file.

  iOS application doesn't have write access to folders outside of the app, so
  it's impossible to instruct the app to flush the profraw data file to the
  desired location. The profraw data file will be generated somewhere within the
  application's Documents folder, and the full path can be obtained by parsing
  the output.
  """
  assert _IsIOSCommand(command)

  # After running tests, iossim generates a profraw data file, it won't be
  # needed anyway, so dump it into the OUTPUT_DIR to avoid polluting the
  # checkout.
  iossim_profraw_file_path = os.path.join(
      OUTPUT_DIR, os.extsep.join(['iossim', PROFRAW_FILE_EXTENSION]))
  command = command.replace(LLVM_PROFILE_FILE_PATH_SUBSTITUTION,
                            iossim_profraw_file_path)

  try:
    with open(output_file_path, 'wb') as output_file_handle:
      subprocess.check_call(_SplitCommand(command),
                            stdout=output_file_handle,
                            stderr=subprocess.STDOUT,
                            env=_GetEnvironmentVars(iossim_profraw_file_path))
  except subprocess.CalledProcessError as e:
    # iossim emits non-zero return code even if tests run successfully, so
    # ignore the return code.
    pass

  return open(output_file_path, 'rb').read()
Runs a single iOS command and generates a profraw data file.

  iOS application doesn't have write access to folders outside of the app, so
  it's impossible to instruct the app to flush the profraw data file to the
  desired location. The profraw data file will be generated somewhere within the
  application's Documents folder, and the full path can be obtained by parsing
  the output.
  
Runs a single iOS command and generates a profraw data file.
iOS application doesn't have write access to folders outside of the app, so
it's impossible to instruct the app to flush the profraw data file to the
desired location. The profraw data file will be generated somewhere within the
application's Documents folder, and the full path can be obtained by parsing
the output.
Runs a single iOS command and generates a profraw data file . iOS application doesn ' t have write access to folders outside of the app so it ' s impossible to instruct the app to flush the profraw data file to the desired location . The profraw data file will be generated somewhere within the application ' s Documents folder and the full path can be obtained by parsing the output .
def _ExecuteIOSCommand(command, output_file_path):
  assert _IsIOSCommand(command)
  iossim_profraw_file_path = os.path.join(
      OUTPUT_DIR, os.extsep.join(['iossim', PROFRAW_FILE_EXTENSION]))
  command = command.replace(LLVM_PROFILE_FILE_PATH_SUBSTITUTION,
                            iossim_profraw_file_path)
  try:
    with open(output_file_path, 'wb') as output_file_handle:
      subprocess.check_call(_SplitCommand(command),
                            stdout=output_file_handle,
                            stderr=subprocess.STDOUT,
                            env=_GetEnvironmentVars(iossim_profraw_file_path))
  except subprocess.CalledProcessError as e:
    pass
  return open(output_file_path, 'rb').read()
def _ExecuteIOSCommand ( command , output_file_path ) : assert _IsIOSCommand ( command ) iossim_profraw_file_path = os . path . join ( OUTPUT_DIR , os . extsep . join ( [ 'iossim' , PROFRAW_FILE_EXTENSION ] ) ) command = command . replace ( LLVM_PROFILE_FILE_PATH_SUBSTITUTION , iossim_profraw_file_path ) try : with open ( output_file_path , 'wb' ) as output_file_handle : subprocess . check_call ( _SplitCommand ( command ) , stdout = output_file_handle , stderr = subprocess . STDOUT , env = _GetEnvironmentVars ( iossim_profraw_file_path ) ) except subprocess . CalledProcessError as e : pass return open ( output_file_path , 'rb' ) . read ( )
Runs a single iOS command and generates a profraw data file.
Runs a single iOS command and generates a profraw data file .
"""Runs a single iOS command and generates a profraw data file.

  iOS application doesn't have write access to folders outside of the app, so
  it's impossible to instruct the app to flush the profraw data file to the
  desired location. The profraw data file will be generated somewhere within the
  application's Documents folder, and the full path can be obtained by parsing
  the output.
  """ # After running tests, iossim generates a profraw data file, it won't be # needed anyway, so dump it into the OUTPUT_DIR to avoid polluting the # checkout. # iossim emits non-zero return code even if tests run successfully, so # ignore the return code.
command
output_file_path