- 3.0.1 core module.
|
Classes | |
class | Subprocess |
Functions | |
def | SetEnvVar (env_var, value) |
def | GetFlag (flag) |
def | GetSourceDir () |
def | GetBuildDir () |
def | GetTempDir () |
def | GetTestExecutablePath (executable_name, build_dir=None) |
def | GetExitStatus (exit_code) |
def | Main () |
Variables | |
string | IS_WINDOWS = 'nt' |
string | IS_CYGWIN = 'posix' |
string | IS_OS2 = 'os2' |
string | GTEST_OUTPUT_VAR_NAME = 'GTEST_OUTPUT' |
string | PREMATURE_EXIT_FILE_ENV_VAR = 'TEST_PREMATURE_EXIT_FILE' |
environ = os.environ.copy() | |
TestCase = _test_module.TestCase | |
def gtest_test_utils.SetEnvVar | ( | env_var, | |
value | |||
) |
Sets/unsets an environment variable to a given value.
def gtest_test_utils.GetFlag | ( | flag | ) |
Returns the value of the given flag.
Referenced by GetBuildDir(), and GetSourceDir().
def gtest_test_utils.GetSourceDir | ( | ) |
Returns the absolute path of the directory where the .py files are.
References GetFlag().
Referenced by gmock_test_utils.GetSourceDir(), and googletest-output-test.GTestOutputTest.testOutput().
def gtest_test_utils.GetBuildDir | ( | ) |
Returns the absolute path of the directory where the test binaries are.
References GetFlag().
Referenced by GetTestExecutablePath().
def gtest_test_utils.GetTempDir | ( | ) |
Referenced by gtest_xml_output_unittest.GTestXMLOutputUnitTest.testDefaultOutputFile(), googletest-json-output-unittest.GTestJsonOutputUnitTest.testDefaultOutputFile(), googletest-json-output-unittest.GTestJsonOutputUnitTest.testFilteredTestJsonOutput(), gtest_list_output_unittest.GTestListTestsOutputUnitTest.testJSON(), gtest_xml_outfiles_test.GTestXMLOutFilesTest.testOutfile2(), googletest-json-outfiles-test.GTestJsonOutFilesTest.testOutfile2(), gtest_xml_output_unittest.GTestXMLOutputUnitTest.testShardedTestXmlOutput(), googletest-filter-unittest.GTestFilterUnitTest.testShardStatusFileIsCreated(), googletest-filter-unittest.GTestFilterUnitTest.testShardStatusFileIsCreatedWithListTests(), googletest-json-output-unittest.GTestJsonOutputUnitTest.testSuppressedJsonOutput(), 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.
References GetBuildDir().
Referenced by gmock_test_utils.GetTestExecutablePath(), gtest_xml_output_unittest.GTestXMLOutputUnitTest.testDefaultOutputFile(), googletest-json-output-unittest.GTestJsonOutputUnitTest.testDefaultOutputFile(), googletest-json-output-unittest.GTestJsonOutputUnitTest.testFilteredTestJsonOutput(), gtest_list_output_unittest.GTestListTestsOutputUnitTest.testJSON(), gtest_xml_outfiles_test.GTestXMLOutFilesTest.testOutfile2(), googletest-json-outfiles-test.GTestJsonOutFilesTest.testOutfile2(), and gtest_xml_output_unittest.GTestXMLOutputUnitTest.testShardedTestXmlOutput().
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).
def gtest_test_utils.Main | ( | ) |
Runs the unit test.
Referenced by gmock_test_utils.Main(), googletest-color-test.GTestColorTest.testAliasesOfYesAndNo(), googletest-break-on-failure-unittest.GTestBreakOnFailureUnitTest.testCatchExceptionsDoesNotInterfere(), googletest-param-test-invalid-name1-test.GTestParamTestInvalidName1Test.testExitCodeAndOutput(), googletest-param-test-invalid-name2-test.GTestParamTestInvalidName2Test.testExitCodeAndOutput(), googletest-uninitialized-test.GTestUninitializedTest.testExitCodeAndOutput(), googletest-json-output-unittest.GTestJsonOutputUnitTest.testFilteredTestJsonOutput(), gtest_list_output_unittest.GTestListTestsOutputUnitTest.testJSON(), gtest_xml_outfiles_test.GTestXMLOutFilesTest.testOutfile2(), googletest-json-outfiles-test.GTestJsonOutFilesTest.testOutfile2(), gtest_help_test.GTestHelpTest.testRunsTestsWithGtestInternalFlag(), gtest_xml_output_unittest.GTestXMLOutputUnitTest.testShardedTestXmlOutput(), googletest-filter-unittest.GTestFilterUnitTest.testShardingWorksWithDeathTests(), googletest-shuffle-test.GTestShuffleUnitTest.testShuffleShardedTestsPreservesPartition(), gtest_skip_environment_check_output_test.SkipEntireEnvironmentTest.testSkipEntireEnvironmentTest(), gtest_testbridge_test.GTestTestFilterTest.testTestExecutionIsFiltered(), googletest-throw-on-failure-test.ThrowOnFailureTest.testThrowOnFailureFlagOverridesEnvVar(), googletest-catch-exceptions-test.CatchCxxExceptionsTest.testUnhandledCxxExceptionsAbortTheProgram(), googletest-list-tests-unittest.GTestListTestsUnitTest.testWithFilterFlags(), and googletest-env-var-test.GTestEnvVarTest.testXmlOutputFileOverride().
string gtest_test_utils.IS_WINDOWS = 'nt' |
string gtest_test_utils.IS_CYGWIN = 'posix' |
string gtest_test_utils.IS_OS2 = 'os2' |
string gtest_test_utils.GTEST_OUTPUT_VAR_NAME = 'GTEST_OUTPUT' |
string gtest_test_utils.PREMATURE_EXIT_FILE_ENV_VAR = 'TEST_PREMATURE_EXIT_FILE' |
gtest_test_utils.environ = os.environ.copy() |
gtest_test_utils.TestCase = _test_module.TestCase |