Classes | Functions | Variables
googletest-output-test Namespace Reference

Classes

class  GTestOutputTest
 

Functions

def GetCommandOutput (env_cmd)
 
def GetOutputOfAllCommands ()
 
def GetShellCommandOutput (env_cmd)
 
def NormalizeOutput (output)
 
def NormalizeToCurrentPlatform (test_output)
 
def RemoveLocations (test_output)
 
def RemoveMatchingTests (test_output, pattern)
 
def RemoveStackTraceDetails (output)
 
def RemoveStackTraces (output)
 
def RemoveTestCounts (output)
 
def RemoveTime (output)
 
def RemoveTypeInfoDetails (test_output)
 
def ToUnixLineEnding (s)
 

Variables

tuple CAN_GENERATE_GOLDEN_FILE
 
string CATCH_EXCEPTIONS_ENV_VAR_NAME = 'GTEST_CATCH_EXCEPTIONS'
 
tuple COMMAND_LIST_TESTS = ({}, [PROGRAM_PATH, '--gtest_list_tests'])
 
tuple COMMAND_WITH_COLOR = ({}, [PROGRAM_PATH, '--gtest_color=yes'])
 
tuple COMMAND_WITH_DISABLED
 
tuple COMMAND_WITH_SHARDING
 
tuple COMMAND_WITH_TIME
 
string GENGOLDEN_FLAG = '--gengolden'
 
 golden_file = open(GOLDEN_PATH, 'wb')
 
string GOLDEN_NAME = 'googletest-output-test-golden-lin.txt'
 
 GOLDEN_PATH = os.path.join(gtest_test_utils.GetSourceDir(), GOLDEN_NAME)
 
string IS_LINUX = 'Linux'
 
string IS_WINDOWS = 'nt'
 
tuple message
 
string NO_STACKTRACE_SUPPORT_FLAG = '--no_stacktrace_support'
 
def output = GetOutputOfAllCommands()
 
 PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('googletest-output-test_')
 
string SUPPORTS_DEATH_TESTS = 'DeathTest' in test_list
 
string SUPPORTS_STACK_TRACES = NO_STACKTRACE_SUPPORT_FLAG not in sys.argv
 
string SUPPORTS_THREADS = 'ExpectFailureWithThreadsTest' in test_list
 
string SUPPORTS_TYPED_TESTS = 'TypedTest' in test_list
 
def test_list = GetShellCommandOutput(COMMAND_LIST_TESTS)
 

Function Documentation

◆ GetCommandOutput()

def googletest-output-test.GetCommandOutput (   env_cmd)
Runs a command and returns its output with all file location
info stripped off.

Args:
  env_cmd:  The shell command. A 2-tuple where element 0 is a dict of extra
            environment variables to set, and element 1 is a string with
            the command and any flags.

Definition at line 224 of file bloaty/third_party/googletest/googletest/test/googletest-output-test.py.

◆ GetOutputOfAllCommands()

def googletest-output-test.GetOutputOfAllCommands ( )
Returns concatenated output from several representative commands.

Definition at line 241 of file bloaty/third_party/googletest/googletest/test/googletest-output-test.py.

◆ GetShellCommandOutput()

def googletest-output-test.GetShellCommandOutput (   env_cmd)
Runs a command in a sub-process, and returns its output in a string.

Args:
  env_cmd: The shell command. A 2-tuple where element 0 is a dict of extra
           environment variables to set, and element 1 is a string with
           the command and any flags.

Returns:
  A string with the command's combined standard and diagnostic output.

Definition at line 203 of file bloaty/third_party/googletest/googletest/test/googletest-output-test.py.

◆ NormalizeOutput()

def googletest-output-test.NormalizeOutput (   output)
Normalizes output (the output of googletest-output-test_.exe).

Definition at line 193 of file bloaty/third_party/googletest/googletest/test/googletest-output-test.py.

◆ NormalizeToCurrentPlatform()

def googletest-output-test.NormalizeToCurrentPlatform (   test_output)
Normalizes platform specific output details for easier comparison.

Definition at line 142 of file bloaty/third_party/googletest/googletest/test/googletest-output-test.py.

◆ RemoveLocations()

def googletest-output-test.RemoveLocations (   test_output)
Removes all file location info from a Google Test program's output.

Args:
     test_output:  the output of a Google Test program.

Returns:
     output with all file location info (in the form of
     'DIRECTORY/FILE_NAME:LINE_NUMBER: 'or
     'DIRECTORY\\FILE_NAME(LINE_NUMBER): ') replaced by
     'FILE_NAME:#: '.

Definition at line 90 of file bloaty/third_party/googletest/googletest/test/googletest-output-test.py.

◆ RemoveMatchingTests()

def googletest-output-test.RemoveMatchingTests (   test_output,
  pattern 
)
Removes output of specified tests from a Google Test program's output.

This function strips not only the beginning and the end of a test but also
all output in between.

Args:
  test_output:       A string containing the test output.
  pattern:           A regex string that matches names of test cases or
                     tests to remove.

Returns:
  Contents of test_output with tests whose names match pattern removed.

Definition at line 170 of file bloaty/third_party/googletest/googletest/test/googletest-output-test.py.

◆ RemoveStackTraceDetails()

def googletest-output-test.RemoveStackTraceDetails (   output)
Removes all stack traces from a Google Test program's output.

Definition at line 107 of file bloaty/third_party/googletest/googletest/test/googletest-output-test.py.

◆ RemoveStackTraces()

def googletest-output-test.RemoveStackTraces (   output)
Removes all traces of stack traces from a Google Test program's output.

Definition at line 115 of file bloaty/third_party/googletest/googletest/test/googletest-output-test.py.

◆ RemoveTestCounts()

def googletest-output-test.RemoveTestCounts (   output)
Removes test counts from a Google Test program's output.

Definition at line 156 of file bloaty/third_party/googletest/googletest/test/googletest-output-test.py.

◆ RemoveTime()

def googletest-output-test.RemoveTime (   output)
Removes all time information from a Google Test program's output.

Definition at line 122 of file bloaty/third_party/googletest/googletest/test/googletest-output-test.py.

◆ RemoveTypeInfoDetails()

def googletest-output-test.RemoveTypeInfoDetails (   test_output)
Removes compiler-specific type info from Google Test program's output.

Args:
     test_output:  the output of a Google Test program.

Returns:
     output with type information normalized to canonical form.

Definition at line 128 of file bloaty/third_party/googletest/googletest/test/googletest-output-test.py.

◆ ToUnixLineEnding()

def googletest-output-test.ToUnixLineEnding (   s)
Changes all Windows/Mac line endings in s to UNIX line endings.

Definition at line 84 of file bloaty/third_party/googletest/googletest/test/googletest-output-test.py.

Variable Documentation

◆ CAN_GENERATE_GOLDEN_FILE

tuple googletest-output-test.CAN_GENERATE_GOLDEN_FILE
Initial value:
1 = (SUPPORTS_DEATH_TESTS and
2  SUPPORTS_TYPED_TESTS and
3  SUPPORTS_THREADS and
4  SUPPORTS_STACK_TRACES)

Definition at line 256 of file bloaty/third_party/googletest/googletest/test/googletest-output-test.py.

◆ CATCH_EXCEPTIONS_ENV_VAR_NAME

string googletest-output-test.CATCH_EXCEPTIONS_ENV_VAR_NAME = 'GTEST_CATCH_EXCEPTIONS'

◆ COMMAND_LIST_TESTS

tuple googletest-output-test.COMMAND_LIST_TESTS = ({}, [PROGRAM_PATH, '--gtest_list_tests'])

◆ COMMAND_WITH_COLOR

tuple googletest-output-test.COMMAND_WITH_COLOR = ({}, [PROGRAM_PATH, '--gtest_color=yes'])

◆ COMMAND_WITH_DISABLED

tuple googletest-output-test.COMMAND_WITH_DISABLED
Initial value:
1 = (
2  {}, [PROGRAM_PATH,
3  '--gtest_also_run_disabled_tests',
4  'internal_skip_environment_and_ad_hoc_tests',
5  '--gtest_filter=*DISABLED_*'])

Definition at line 70 of file bloaty/third_party/googletest/googletest/test/googletest-output-test.py.

◆ COMMAND_WITH_SHARDING

tuple googletest-output-test.COMMAND_WITH_SHARDING
Initial value:
1 = (
2  {'GTEST_SHARD_INDEX': '1', 'GTEST_TOTAL_SHARDS': '2'},
3  [PROGRAM_PATH,
4  'internal_skip_environment_and_ad_hoc_tests',
5  '--gtest_filter=PassingTest.*'])

Definition at line 75 of file bloaty/third_party/googletest/googletest/test/googletest-output-test.py.

◆ COMMAND_WITH_TIME

tuple googletest-output-test.COMMAND_WITH_TIME
Initial value:
1 = ({}, [PROGRAM_PATH,
2  '--gtest_print_time',
3  'internal_skip_environment_and_ad_hoc_tests',
4  '--gtest_filter=FatalFailureTest.*:LoggingTest.*'])

Definition at line 66 of file bloaty/third_party/googletest/googletest/test/googletest-output-test.py.

◆ GENGOLDEN_FLAG

string googletest-output-test.GENGOLDEN_FLAG = '--gengolden'

◆ golden_file

googletest-output-test.golden_file = open(GOLDEN_PATH, 'wb')

◆ GOLDEN_NAME

string googletest-output-test.GOLDEN_NAME = 'googletest-output-test-golden-lin.txt'

◆ GOLDEN_PATH

googletest-output-test.GOLDEN_PATH = os.path.join(gtest_test_utils.GetSourceDir(), GOLDEN_NAME)

◆ IS_LINUX

string googletest-output-test.IS_LINUX = 'Linux'

◆ IS_WINDOWS

string googletest-output-test.IS_WINDOWS = 'nt'

◆ message

tuple googletest-output-test.message
Initial value:
1 = (
2  )

Definition at line 337 of file bloaty/third_party/googletest/googletest/test/googletest-output-test.py.

◆ NO_STACKTRACE_SUPPORT_FLAG

string googletest-output-test.NO_STACKTRACE_SUPPORT_FLAG = '--no_stacktrace_support'

◆ output

def googletest-output-test.output = GetOutputOfAllCommands()

◆ PROGRAM_PATH

googletest-output-test.PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('googletest-output-test_')

◆ SUPPORTS_DEATH_TESTS

string googletest-output-test.SUPPORTS_DEATH_TESTS = 'DeathTest' in test_list

◆ SUPPORTS_STACK_TRACES

string googletest-output-test.SUPPORTS_STACK_TRACES = NO_STACKTRACE_SUPPORT_FLAG not in sys.argv

◆ SUPPORTS_THREADS

string googletest-output-test.SUPPORTS_THREADS = 'ExpectFailureWithThreadsTest' in test_list

◆ SUPPORTS_TYPED_TESTS

string googletest-output-test.SUPPORTS_TYPED_TESTS = 'TypedTest' in test_list

◆ test_list

def googletest-output-test.test_list = GetShellCommandOutput(COMMAND_LIST_TESTS)


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:30