|
Torque2D Reference
|
Classes | |
| class | GTestOutputTest |
Functions | |
| def | ToUnixLineEnding (s) |
| def | RemoveLocations (test_output) |
| def | RemoveStackTraceDetails (output) |
| def | RemoveStackTraces (output) |
| def | RemoveTime (output) |
| def | RemoveTypeInfoDetails (test_output) |
| def | NormalizeToCurrentPlatform (test_output) |
| def | RemoveTestCounts (output) |
| def | RemoveMatchingTests (test_output, pattern) |
| def | NormalizeOutput (output) |
| def | GetShellCommandOutput (env_cmd) |
| def | GetCommandOutput (env_cmd) |
| def | GetOutputOfAllCommands () |
Variables | |
| string | __author__ = 'wan@google.com (Zhanyong Wan)' |
| string | GENGOLDEN_FLAG = '--gengolden' |
| string | CATCH_EXCEPTIONS_ENV_VAR_NAME = 'GTEST_CATCH_EXCEPTIONS' |
| string | IS_WINDOWS = 'nt' |
| string | GOLDEN_NAME = 'gtest_output_test_golden_lin.txt' |
| tuple | PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('gtest_output_test_') |
| tuple | COMMAND_LIST_TESTS = ({}, [PROGRAM_PATH, '--gtest_list_tests']) |
| tuple | COMMAND_WITH_COLOR = ({}, [PROGRAM_PATH, '--gtest_color=yes']) |
| tuple | COMMAND_WITH_TIME |
| tuple | COMMAND_WITH_DISABLED |
| tuple | COMMAND_WITH_SHARDING |
| tuple | GOLDEN_PATH = os.path.join(gtest_test_utils.GetSourceDir(), GOLDEN_NAME) |
| tuple | test_list = GetShellCommandOutput(COMMAND_LIST_TESTS) |
| string | SUPPORTS_DEATH_TESTS = 'DeathTest' |
| string | SUPPORTS_TYPED_TESTS = 'TypedTest' |
| string | SUPPORTS_THREADS = 'ExpectFailureWithThreadsTest' |
| SUPPORTS_STACK_TRACES = False | |
| tuple | CAN_GENERATE_GOLDEN_FILE |
| tuple | output = GetOutputOfAllCommands() |
| tuple | golden_file = open(GOLDEN_PATH, 'wb') |
| tuple | message |
| def gtest_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.
| def gtest_output_test.GetOutputOfAllCommands | ( | ) |
Returns concatenated output from several representative commands.
| def gtest_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.
| def gtest_output_test.NormalizeOutput | ( | output | ) |
Normalizes output (the output of gtest_output_test_.exe).
| def gtest_output_test.NormalizeToCurrentPlatform | ( | test_output | ) |
Normalizes platform specific output details for easier comparison.
| 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:#: '.
| 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.
| def gtest_output_test.RemoveStackTraceDetails | ( | output | ) |
Removes all stack traces from a Google Test program's output.
| def gtest_output_test.RemoveStackTraces | ( | output | ) |
Removes all traces of stack traces from a Google Test program's output.
| def gtest_output_test.RemoveTestCounts | ( | output | ) |
Removes test counts from a Google Test program's output.
| def gtest_output_test.RemoveTime | ( | output | ) |
Removes all time information from a Google Test program's output.
| def gtest_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.
| def gtest_output_test.ToUnixLineEnding | ( | s | ) |
Changes all Windows/Mac line endings in s to UNIX line endings.
| 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) |
1.8.10