tools/nocompile_driver.py
def FailTest(resultfile, test, error, stdout=None, stderr=None):
  """Logs the result of a test started by StartTest()

  Args:
    resultfile: File object for .cc file that results are written to.
    test: An instance of the dictionary returned by StartTest()
    error: The printable reason for the failure.
    stdout: The test's output to stdout.
    stderr: The test's output to stderr.
  """
  resultfile.write('#error "%s Failed: %s"\n' % (test['name'], error))
  resultfile.write('#error "compile line: %s"\n' % test['cmdline'])
  if stdout and len(stdout) != 0:
    resultfile.write('#error "%s stdout:"\n' % test['name'])
    for line in stdout.split('\n'):
      resultfile.write('#error "  %s:"\n' % line)

  if stderr and len(stderr) != 0:
    resultfile.write('#error "%s stderr:"\n' % test['name'])
    for line in stderr.split('\n'):
      resultfile.write('#error "  %s"\n' % line)
  resultfile.write('\n')
Logs the result of a test started by StartTest()

  Args:
    resultfile: File object for .cc file that results are written to.
    test: An instance of the dictionary returned by StartTest()
    error: The printable reason for the failure.
    stdout: The test's output to stdout.
    stderr: The test's output to stderr.
  
Logs the result of a test started by StartTest()
Logs the result of a test started by StartTest ()
def FailTest(resultfile, test, error, stdout=None, stderr=None):
  resultfile.write('#error "%s Failed: %s"\n' % (test['name'], error))
  resultfile.write('#error "compile line: %s"\n' % test['cmdline'])
  if stdout and len(stdout) != 0:
    resultfile.write('#error "%s stdout:"\n' % test['name'])
    for line in stdout.split('\n'):
      resultfile.write('#error "  %s:"\n' % line)
  if stderr and len(stderr) != 0:
    resultfile.write('#error "%s stderr:"\n' % test['name'])
    for line in stderr.split('\n'):
      resultfile.write('#error "  %s"\n' % line)
  resultfile.write('\n')
def FailTest ( resultfile , test , error , stdout = None , stderr = None ) : resultfile . write ( '#error "%s Failed: %s"\n' % ( test [ 'name' ] , error ) ) resultfile . write ( '#error "compile line: %s"\n' % test [ 'cmdline' ] ) if stdout and len ( stdout ) != 0 : resultfile . write ( '#error "%s stdout:"\n' % test [ 'name' ] ) for line in stdout . split ( '\n' ) : resultfile . write ( '#error "  %s:"\n' % line ) if stderr and len ( stderr ) != 0 : resultfile . write ( '#error "%s stderr:"\n' % test [ 'name' ] ) for line in stderr . split ( '\n' ) : resultfile . write ( '#error "  %s"\n' % line ) resultfile . write ( '\n' )
Logs the result of a test started by StartTest()
Logs the result of a test started by StartTest ()
"""Logs the result of a test started by StartTest()

  Args:
    resultfile: File object for .cc file that results are written to.
    test: An instance of the dictionary returned by StartTest()
    error: The printable reason for the failure.
    stdout: The test's output to stdout.
    stderr: The test's output to stderr.
  """
resultfile
File object for .cc file that results are written to.
File object for . cc file that results are written to .
test
An instance of the dictionary returned by StartTest()
An instance of the dictionary returned by StartTest ()
error
The printable reason for the failure.
The printable reason for the failure .
stdout
The test's output to stdout.
The test ' s output to stdout .
stderr
The test's output to stderr.
The test ' s output to stderr .