Classes | Functions | Variables
gtest_output_test Namespace Reference

Classes

class  GTestOutputTest

Functions

def GetCommandOutput
def GetOutputOfAllCommands
def GetShellCommandOutput
def NormalizeOutput
def NormalizeToCurrentPlatform
def RemoveLocations
def RemoveMatchingTests
def RemoveStackTraceDetails
def RemoveStackTraces
def RemoveTestCounts
def RemoveTime
def RemoveTypeInfoDetails
def ToUnixLineEnding

Variables

string __author__ = 'wan@google.com (Zhanyong Wan)'
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'
tuple golden_file = open(GOLDEN_PATH, 'wb')
string GOLDEN_NAME = 'gtest_output_test_golden_lin.txt'
tuple GOLDEN_PATH = os.path.join(gtest_test_utils.GetSourceDir(), GOLDEN_NAME)
string IS_WINDOWS = 'nt'
tuple message
tuple output = GetOutputOfAllCommands()
tuple PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('gtest_output_test_')
string SUPPORTS_DEATH_TESTS = 'DeathTest'
 SUPPORTS_STACK_TRACES = False
string SUPPORTS_THREADS = 'ExpectFailureWithThreadsTest'
string SUPPORTS_TYPED_TESTS = 'TypedTest'
tuple test_list = GetShellCommandOutput(COMMAND_LIST_TESTS)

Function Documentation

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 221 of file gtest_output_test.py.

Returns concatenated output from several representative commands.

Definition at line 238 of file gtest_output_test.py.

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 200 of file gtest_output_test.py.

Normalizes output (the output of gtest_output_test_.exe).

Definition at line 190 of file gtest_output_test.py.

Normalizes platform specific output details for easier comparison.

Definition at line 139 of file gtest_output_test.py.

def gtest_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 88 of file gtest_output_test.py.

def gtest_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 167 of file gtest_output_test.py.

Removes all stack traces from a Google Test program's output.

Definition at line 104 of file gtest_output_test.py.

Removes all traces of stack traces from a Google Test program's output.

Definition at line 112 of file gtest_output_test.py.

Removes test counts from a Google Test program's output.

Definition at line 153 of file gtest_output_test.py.

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

Definition at line 119 of file gtest_output_test.py.

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 125 of file gtest_output_test.py.

Changes all Windows/Mac line endings in s to UNIX line endings.

Definition at line 82 of file gtest_output_test.py.


Variable Documentation

string gtest_output_test::__author__ = 'wan@google.com (Zhanyong Wan)'

Definition at line 41 of file gtest_output_test.py.

Initial value:
00001 (SUPPORTS_DEATH_TESTS and
00002                             SUPPORTS_TYPED_TESTS and
00003                             SUPPORTS_THREADS and
00004                             not IS_WINDOWS)

Definition at line 253 of file gtest_output_test.py.

string gtest_output_test::CATCH_EXCEPTIONS_ENV_VAR_NAME = 'GTEST_CATCH_EXCEPTIONS'

Definition at line 51 of file gtest_output_test.py.

tuple gtest_output_test::COMMAND_LIST_TESTS = ({}, [PROGRAM_PATH, '--gtest_list_tests'])

Definition at line 62 of file gtest_output_test.py.

tuple gtest_output_test::COMMAND_WITH_COLOR = ({}, [PROGRAM_PATH, '--gtest_color=yes'])

Definition at line 63 of file gtest_output_test.py.

Initial value:
00001 (
00002     {}, [PROGRAM_PATH,
00003          '--gtest_also_run_disabled_tests',
00004          '--gtest_internal_skip_environment_and_ad_hoc_tests',
00005          '--gtest_filter=*DISABLED_*'])

Definition at line 68 of file gtest_output_test.py.

Initial value:
00001 (
00002     {'GTEST_SHARD_INDEX': '1', 'GTEST_TOTAL_SHARDS': '2'},
00003     [PROGRAM_PATH,
00004      '--gtest_internal_skip_environment_and_ad_hoc_tests',
00005      '--gtest_filter=PassingTest.*'])

Definition at line 73 of file gtest_output_test.py.

Initial value:
00001 ({}, [PROGRAM_PATH,
00002                           '--gtest_print_time',
00003                           '--gtest_internal_skip_environment_and_ad_hoc_tests',
00004                           '--gtest_filter=FatalFailureTest.*:LoggingTest.*'])

Definition at line 64 of file gtest_output_test.py.

string gtest_output_test::GENGOLDEN_FLAG = '--gengolden'

Definition at line 50 of file gtest_output_test.py.

Definition at line 322 of file gtest_output_test.py.

string gtest_output_test::GOLDEN_NAME = 'gtest_output_test_golden_lin.txt'

Definition at line 56 of file gtest_output_test.py.

Definition at line 79 of file gtest_output_test.py.

Definition at line 53 of file gtest_output_test.py.

Initial value:
00001 (
00002           """Unable to write a golden file when compiled in an environmentthat does not support all the required features (death tests, typed tests,and multiple threads).  Please generate the golden file using a binary builtwith those features enabled.""")

Definition at line 326 of file gtest_output_test.py.

Definition at line 321 of file gtest_output_test.py.

Definition at line 58 of file gtest_output_test.py.

Definition at line 248 of file gtest_output_test.py.

Definition at line 251 of file gtest_output_test.py.

string gtest_output_test::SUPPORTS_THREADS = 'ExpectFailureWithThreadsTest'

Definition at line 250 of file gtest_output_test.py.

Definition at line 249 of file gtest_output_test.py.

Definition at line 247 of file gtest_output_test.py.



rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:11