Classes | Functions | Variables
gtest_test_utils Namespace Reference

Classes

class  Subprocess
 

Functions

def _ParseAndStripGTestFlags (argv)
 
def _RemoveTempDir ()
 
def GetBuildDir ()
 
def GetExitStatus (exit_code)
 
def GetFlag (flag)
 
def GetSourceDir ()
 
def GetTempDir ()
 
def GetTestExecutablePath (executable_name, build_dir=None)
 
def Main ()
 
def SetEnvVar (env_var, value)
 

Variables

dictionary _flag_map
 
bool _gtest_flags_are_parsed = False
 
bool _SUBPROCESS_MODULE_AVAILABLE = True
 
 _temp_dir = None
 
 environ = os.environ.copy()
 
string GTEST_OUTPUT_VAR_NAME = 'GTEST_OUTPUT'
 
string IS_CYGWIN = 'posix' and 'CYGWIN' in os.uname()[0]
 
string IS_OS2 = 'os2'
 
string IS_WINDOWS = 'nt'
 
string PREMATURE_EXIT_FILE_ENV_VAR = 'TEST_PREMATURE_EXIT_FILE'
 
 TestCase = _test_module.TestCase
 

Function Documentation

◆ _ParseAndStripGTestFlags()

def gtest_test_utils._ParseAndStripGTestFlags (   argv)
private
Parses and strips Google Test flags from argv.  This is idempotent.

Definition at line 83 of file bloaty/third_party/googletest/googletest/test/gtest_test_utils.py.

◆ _RemoveTempDir()

def gtest_test_utils._RemoveTempDir ( )
private

◆ GetBuildDir()

def gtest_test_utils.GetBuildDir ( )
Returns the absolute path of the directory where the test binaries are.

Definition at line 129 of file bloaty/third_party/googletest/googletest/test/gtest_test_utils.py.

◆ GetExitStatus()

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 182 of file bloaty/third_party/googletest/googletest/test/gtest_test_utils.py.

◆ GetFlag()

def gtest_test_utils.GetFlag (   flag)
Returns the value of the given flag.

Definition at line 112 of file bloaty/third_party/googletest/googletest/test/gtest_test_utils.py.

◆ GetSourceDir()

def gtest_test_utils.GetSourceDir ( )
Returns the absolute path of the directory where the .py files are.

Definition at line 123 of file bloaty/third_party/googletest/googletest/test/gtest_test_utils.py.

◆ GetTempDir()

def gtest_test_utils.GetTempDir ( )

◆ GetTestExecutablePath()

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 151 of file bloaty/third_party/googletest/googletest/test/gtest_test_utils.py.

◆ Main()

def gtest_test_utils.Main ( )
Runs the unit test.

Definition at line 301 of file bloaty/third_party/googletest/googletest/test/gtest_test_utils.py.

◆ SetEnvVar()

def gtest_test_utils.SetEnvVar (   env_var,
  value 
)
Sets/unsets an environment variable to a given value.

Definition at line 62 of file bloaty/third_party/googletest/googletest/test/gtest_test_utils.py.

Variable Documentation

◆ _flag_map

dictionary gtest_test_utils._flag_map
private
Initial value:
1 = {'source_dir': os.path.dirname(sys.argv[0]),
2  'build_dir': os.path.dirname(sys.argv[0])}

Definition at line 78 of file bloaty/third_party/googletest/googletest/test/gtest_test_utils.py.

◆ _gtest_flags_are_parsed

bool gtest_test_utils._gtest_flags_are_parsed = False
private

◆ _SUBPROCESS_MODULE_AVAILABLE

bool gtest_test_utils._SUBPROCESS_MODULE_AVAILABLE = True
private

◆ _temp_dir

gtest_test_utils._temp_dir = None
private

◆ environ

gtest_test_utils.environ = os.environ.copy()

◆ GTEST_OUTPUT_VAR_NAME

string gtest_test_utils.GTEST_OUTPUT_VAR_NAME = 'GTEST_OUTPUT'

◆ IS_CYGWIN

string gtest_test_utils.IS_CYGWIN = 'posix' and 'CYGWIN' in os.uname()[0]

◆ IS_OS2

string gtest_test_utils.IS_OS2 = 'os2'

◆ IS_WINDOWS

string gtest_test_utils.IS_WINDOWS = 'nt'

◆ PREMATURE_EXIT_FILE_ENV_VAR

string gtest_test_utils.PREMATURE_EXIT_FILE_ENV_VAR = 'TEST_PREMATURE_EXIT_FILE'

◆ TestCase

gtest_test_utils.TestCase = _test_module.TestCase


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:40