Analysis Software
Documentation for sPHENIX simulation software
|
Classes | |
class | Subprocess |
Functions | |
def | SetEnvVar |
def | _ParseAndStripGTestFlags |
def | GetFlag |
def | GetSourceDir |
def | GetBuildDir |
def | _RemoveTempDir |
def | GetTempDir |
def | GetTestExecutablePath |
def | GetExitStatus |
def | Main |
Variables | |
string | __author__ 'wan@google.com (Zhanyong Wan)' |
_test_module unittest | |
_SUBPROCESS_MODULE_AVAILABLE True | |
string | GTEST_OUTPUT_VAR_NAME 'GTEST_OUTPUT' |
string | IS_WINDOWS 'nt' |
string | IS_CYGWIN 'posix' |
string | PREMATURE_EXIT_FILE_ENV_VAR 'TEST_PREMATURE_EXIT_FILE' |
tuple | environ os.environ.copy() |
TestCase _test_module.TestCase | |
dictionary | _flag_map |
_gtest_flags_are_parsed False | |
_temp_dir None | |
|
private |
Parses and strips Google Test flags from argv. This is idempotent.
Definition at line 86 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 86 of file gtest_test_utils.py
Referenced by GetFlag(), and Main().
|
private |
Definition at line 140 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 140 of file gtest_test_utils.py
def gtest_test_utils.GetBuildDir | ( | ) |
Returns the absolute path of the directory where the test binaries are.
Definition at line 132 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 132 of file gtest_test_utils.py
References GetFlag().
Referenced by GetTestExecutablePath().
def gtest_test_utils.GetExitStatus | ( | exit_code | ) |
Returns the argument to exit(), or -1 if exit() wasn't called. Args: exit_code: the result value of os.system(command).
Definition at line 187 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 187 of file gtest_test_utils.py
def gtest_test_utils.GetFlag | ( | flag | ) |
Returns the value of the given flag.
Definition at line 115 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 115 of file gtest_test_utils.py
References _ParseAndStripGTestFlags().
Referenced by GetBuildDir(), and GetSourceDir().
def gtest_test_utils.GetSourceDir | ( | ) |
Returns the absolute path of the directory where the .py files are.
Definition at line 126 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 126 of file gtest_test_utils.py
References GetFlag().
Referenced by gmock_test_utils.GetSourceDir(), and gtest_output_test.GTestOutputTest.testOutput().
def gtest_test_utils.GetTempDir | ( | ) |
Returns a directory for temporary files.
Definition at line 147 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 147 of file gtest_test_utils.py
Referenced by gtest_xml_output_unittest.GTestXMLOutputUnitTest._GetXmlOutput(), gtest_xml_outfiles_test.GTestXMLOutFilesTest._TestOutFile(), gtest_xml_output_unittest.GTestXMLOutputUnitTest.testDefaultOutputFile(), gtest_filter_unittest.GTestFilterUnitTest.testShardStatusFileIsCreated(), gtest_filter_unittest.GTestFilterUnitTest.testShardStatusFileIsCreatedWithListTests(), and gtest_xml_output_unittest.GTestXMLOutputUnitTest.testSuppressedXmlOutput().
def gtest_test_utils.GetTestExecutablePath | ( | executable_name, | |
build_dir = None |
|||
) |
Returns the absolute path of the test binary given its name. The function will print a message and abort the program if the resulting file doesn't exist. Args: executable_name: name of the test binary that the test script runs. build_dir: directory where to look for executables, by default the result of GetBuildDir(). Returns: The absolute path of the test binary.
Definition at line 156 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 156 of file gtest_test_utils.py
References GetBuildDir().
Referenced by gtest_xml_output_unittest.GTestXMLOutputUnitTest._GetXmlOutput(), gtest_xml_outfiles_test.GTestXMLOutFilesTest._TestOutFile(), gmock_test_utils.GetTestExecutablePath(), and gtest_xml_output_unittest.GTestXMLOutputUnitTest.testDefaultOutputFile().
def gtest_test_utils.Main | ( | ) |
Runs the unit test.
Definition at line 306 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 306 of file gtest_test_utils.py
References _ParseAndStripGTestFlags().
Referenced by gtest_xml_outfiles_test.GTestXMLOutFilesTest._TestOutFile(), gtest_xml_output_unittest.GTestXMLOutputUnitTest._TestXmlOutput(), gmock_test_utils.Main(), gtest_color_test.GTestColorTest.testAliasesOfYesAndNo(), gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testCatchExceptionsDoesNotInterfere(), gtest_uninitialized_test.GTestUninitializedTest.testExitCodeAndOutput(), gtest_help_test.GTestHelpTest.testRunsTestsWithGtestInternalFlag(), gtest_filter_unittest.GTestFilterUnitTest.testShardingWorksWithDeathTests(), gtest_shuffle_test.GTestShuffleUnitTest.testShuffleShardedTestsPreservesPartition(), gtest_throw_on_failure_test.ThrowOnFailureTest.testThrowOnFailureFlagOverridesEnvVar(), gtest_catch_exceptions_test.CatchCxxExceptionsTest.testUnhandledCxxExceptionsAbortTheProgram(), gtest_list_tests_unittest.GTestListTestsUnitTest.testWithFilterFlags(), and gtest_env_var_test.GTestEnvVarTest.testXmlOutputFileOverride().
def gtest_test_utils.SetEnvVar | ( | env_var, | |
value | |||
) |
Sets/unsets an environment variable to a given value.
Definition at line 65 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 65 of file gtest_test_utils.py
string gtest_test_utils.__author__ 'wan@google.com (Zhanyong Wan)' |
Definition at line 34 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 34 of file gtest_test_utils.py
dictionary gtest_test_utils._flag_map |
Definition at line 81 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 81 of file gtest_test_utils.py
gtest_test_utils._gtest_flags_are_parsed False |
Definition at line 83 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 83 of file gtest_test_utils.py
gtest_test_utils._SUBPROCESS_MODULE_AVAILABLE True |
Definition at line 48 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 48 of file gtest_test_utils.py
gtest_test_utils._temp_dir None |
Definition at line 138 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 138 of file gtest_test_utils.py
gtest_test_utils._test_module unittest |
Definition at line 42 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 42 of file gtest_test_utils.py
tuple gtest_test_utils.environ os.environ.copy() |
Definition at line 62 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 62 of file gtest_test_utils.py
string gtest_test_utils.GTEST_OUTPUT_VAR_NAME 'GTEST_OUTPUT' |
Definition at line 54 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 54 of file gtest_test_utils.py
string gtest_test_utils.IS_CYGWIN 'posix' |
Definition at line 57 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 57 of file gtest_test_utils.py
string gtest_test_utils.IS_WINDOWS 'nt' |
Definition at line 56 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 56 of file gtest_test_utils.py
string gtest_test_utils.PREMATURE_EXIT_FILE_ENV_VAR 'TEST_PREMATURE_EXIT_FILE' |
Definition at line 60 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 60 of file gtest_test_utils.py
gtest_test_utils.TestCase _test_module.TestCase |
Definition at line 77 of file gtest_test_utils.py.
View newest version in sPHENIX GitHub at line 77 of file gtest_test_utils.py