Analysis Software
Documentation for sPHENIX simulation software
|
Classes | |
class | GTestOutputTest |
Functions | |
def | ToUnixLineEnding |
def | RemoveLocations |
def | RemoveStackTraceDetails |
def | RemoveStackTraces |
def | RemoveTime |
def | RemoveTypeInfoDetails |
def | NormalizeToCurrentPlatform |
def | RemoveTestCounts |
def | RemoveMatchingTests |
def | NormalizeOutput |
def | GetShellCommandOutput |
def | GetCommandOutput |
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.
Definition at line 222 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 222 of file gtest_output_test.py
References GetShellCommandOutput(), and NormalizeOutput().
Referenced by GetOutputOfAllCommands().
def gtest_output_test.GetOutputOfAllCommands | ( | ) |
Returns concatenated output from several representative commands.
Definition at line 239 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 239 of file gtest_output_test.py
References GetCommandOutput().
Referenced by gtest_output_test.GTestOutputTest.testOutput().
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.
Definition at line 201 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 201 of file gtest_output_test.py
Referenced by GetCommandOutput().
def gtest_output_test.NormalizeOutput | ( | output | ) |
Normalizes output (the output of gtest_output_test_.exe).
Definition at line 191 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 191 of file gtest_output_test.py
References RemoveLocations(), RemoveStackTraceDetails(), RemoveTime(), and ToUnixLineEnding().
Referenced by GetCommandOutput().
def gtest_output_test.NormalizeToCurrentPlatform | ( | test_output | ) |
Normalizes platform specific output details for easier comparison.
Definition at line 140 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 140 of file gtest_output_test.py
Referenced by gtest_output_test.GTestOutputTest.testOutput().
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 89 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 89 of file gtest_output_test.py
Referenced by NormalizeOutput().
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 168 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 168 of file gtest_output_test.py
Referenced by gtest_output_test.GTestOutputTest.RemoveUnsupportedTests().
def gtest_output_test.RemoveStackTraceDetails | ( | output | ) |
Removes all stack traces from a Google Test program's output.
Definition at line 105 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 105 of file gtest_output_test.py
Referenced by NormalizeOutput().
def gtest_output_test.RemoveStackTraces | ( | output | ) |
Removes all traces of stack traces from a Google Test program's output.
Definition at line 113 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 113 of file gtest_output_test.py
Referenced by gtest_output_test.GTestOutputTest.RemoveUnsupportedTests().
def gtest_output_test.RemoveTestCounts | ( | output | ) |
Removes test counts from a Google Test program's output.
Definition at line 154 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 154 of file gtest_output_test.py
Referenced by gtest_output_test.GTestOutputTest.testOutput().
def gtest_output_test.RemoveTime | ( | output | ) |
Removes all time information from a Google Test program's output.
Definition at line 120 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 120 of file gtest_output_test.py
Referenced by NormalizeOutput().
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.
Definition at line 126 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 126 of file gtest_output_test.py
Referenced by gtest_output_test.GTestOutputTest.testOutput().
def gtest_output_test.ToUnixLineEnding | ( | s | ) |
Changes all Windows/Mac line endings in s to UNIX line endings.
Definition at line 83 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 83 of file gtest_output_test.py
Referenced by NormalizeOutput(), and gtest_output_test.GTestOutputTest.testOutput().
string gtest_output_test.__author__ 'wan@google.com (Zhanyong Wan)' |
Definition at line 41 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 41 of file gtest_output_test.py
tuple gtest_output_test.CAN_GENERATE_GOLDEN_FILE |
Definition at line 254 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 254 of file gtest_output_test.py
string gtest_output_test.CATCH_EXCEPTIONS_ENV_VAR_NAME 'GTEST_CATCH_EXCEPTIONS' |
Definition at line 52 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 52 of file gtest_output_test.py
tuple gtest_output_test.COMMAND_LIST_TESTS ({}, [PROGRAM_PATH, '--gtest_list_tests']) |
Definition at line 63 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 63 of file gtest_output_test.py
tuple gtest_output_test.COMMAND_WITH_COLOR ({}, [PROGRAM_PATH, '--gtest_color=yes']) |
Definition at line 64 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 64 of file gtest_output_test.py
tuple gtest_output_test.COMMAND_WITH_DISABLED |
Definition at line 69 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 69 of file gtest_output_test.py
tuple gtest_output_test.COMMAND_WITH_SHARDING |
Definition at line 74 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 74 of file gtest_output_test.py
tuple gtest_output_test.COMMAND_WITH_TIME |
Definition at line 65 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 65 of file gtest_output_test.py
string gtest_output_test.GENGOLDEN_FLAG '--gengolden' |
Definition at line 51 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 51 of file gtest_output_test.py
tuple gtest_output_test.golden_file open(GOLDEN_PATH, 'wb') |
Definition at line 327 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 327 of file gtest_output_test.py
string gtest_output_test.GOLDEN_NAME 'gtest_output_test_golden_lin.txt' |
Definition at line 57 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 57 of file gtest_output_test.py
tuple gtest_output_test.GOLDEN_PATH os.path.join(gtest_test_utils.GetSourceDir(), GOLDEN_NAME) |
Definition at line 80 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 80 of file gtest_output_test.py
string gtest_output_test.IS_WINDOWS 'nt' |
Definition at line 54 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 54 of file gtest_output_test.py
tuple gtest_output_test.message |
Definition at line 331 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 331 of file gtest_output_test.py
Referenced by Acts::Python.addLogging(), testing::UnitTest.AddTestPartResult(), testing.AssertionFailure(), OnlMonStatusDB.CheckAndCreateTable(), PHG4FullProjTiltedSpacalDetector.Construct_Tower(), PHG4FullProjSpacalDetector.Construct_Tower(), testing::AssertionResult.failure_message(), SequenceTestingListener.GetEventDescription(), SphenixClient.lockGlobalTag(), testing::internal.Log(), mg_broadcast(), mg_rpc_create_std_error(), testing::internal::EventRecordingListener.OnTestIterationEnd(), testing::internal::EventRecordingListener.OnTestIterationStart(), testing::internal::FunctionMockerBase< R(A1, A2)>.PerformDefaultAction(), SphenixClient.setGlobalTag(), G4TBMagneticFieldSetup.SetStepper(), TEST(), SphenixClient.unlockGlobalTag(), PHG4GDMLWrite.Write(), OnlMonServer.WriteLogFile(), and TSQLini.~TSQLini().
tuple gtest_output_test.output GetOutputOfAllCommands() |
Definition at line 326 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 326 of file gtest_output_test.py
tuple gtest_output_test.PROGRAM_PATH gtest_test_utils.GetTestExecutablePath('gtest_output_test_') |
Definition at line 59 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 59 of file gtest_output_test.py
string gtest_output_test.SUPPORTS_DEATH_TESTS 'DeathTest' |
Definition at line 249 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 249 of file gtest_output_test.py
gtest_output_test.SUPPORTS_STACK_TRACES False |
Definition at line 252 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 252 of file gtest_output_test.py
string gtest_output_test.SUPPORTS_THREADS 'ExpectFailureWithThreadsTest' |
Definition at line 251 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 251 of file gtest_output_test.py
string gtest_output_test.SUPPORTS_TYPED_TESTS 'TypedTest' |
Definition at line 250 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 250 of file gtest_output_test.py
tuple gtest_output_test.test_list GetShellCommandOutput(COMMAND_LIST_TESTS) |
Definition at line 248 of file gtest_output_test.py.
View newest version in sPHENIX GitHub at line 248 of file gtest_output_test.py