Classes | Functions | Variables
googletest-filter-unittest Namespace Reference

Classes

class  GTestFilterUnitTest
 

Functions

def InvokeWithModifiedEnv (extra_env, function, *args, **kwargs)
 
def RunAndExtractTestList (args=None)
 
def RunAndReturnOutput (args=None)
 
def RunWithSharding (total_shards, shard_index, command)
 
def SetEnvVar (env_var, value)
 

Variables

list ACTIVE_TESTS
 
string ALSO_RUN_DISABLED_TESTS_FLAG = 'gtest_also_run_disabled_tests'
 
bool CAN_PASS_EMPTY_ENV = False
 
tuple CAN_TEST_EMPTY_FILTER = (CAN_PASS_EMPTY_ENV and CAN_UNSET_ENV)
 
bool CAN_UNSET_ENV = False
 
 child
 
 COMMAND = gtest_test_utils.GetTestExecutablePath('googletest-filter-unittest_')
 
list DEATH_TESTS
 
list DISABLED_TESTS
 
 environ = os.environ.copy()
 
string FILTER_ENV_VAR = 'GTEST_FILTER'
 
string FILTER_FLAG = 'gtest_filter'
 
string LIST_TESTS_FLAG = '--gtest_list_tests'
 
 PARAM_TEST_REGEX = re.compile(r'/ParamTest')
 
list PARAM_TESTS
 
 param_tests_present = None
 
string SHARD_INDEX_ENV_VAR = 'GTEST_SHARD_INDEX'
 
string SHARD_STATUS_FILE_ENV_VAR = 'GTEST_SHARD_STATUS_FILE'
 
string SUPPORTS_DEATH_TESTS
 
 TEST_CASE_REGEX = re.compile(r'^\[\-+\] \d+ tests? from (\w+(/\w+)?)')
 
 TEST_REGEX = re.compile(r'^\[\s*RUN\s*\].*\.(\w+(/\w+)?)')
 
string TOTAL_SHARDS_ENV_VAR = 'GTEST_TOTAL_SHARDS'
 

Function Documentation

◆ InvokeWithModifiedEnv()

def googletest-filter-unittest.InvokeWithModifiedEnv (   extra_env,
  function,
args,
**  kwargs 
)
Runs the given function and arguments in a modified environment.

Definition at line 209 of file googletest-filter-unittest.py.

◆ RunAndExtractTestList()

def googletest-filter-unittest.RunAndExtractTestList (   args = None)
Runs the test program and returns its exit code and a list of tests run.

Definition at line 190 of file googletest-filter-unittest.py.

◆ RunAndReturnOutput()

def googletest-filter-unittest.RunAndReturnOutput (   args = None)
Runs the test program and returns its output.

Definition at line 183 of file googletest-filter-unittest.py.

◆ RunWithSharding()

def googletest-filter-unittest.RunWithSharding (   total_shards,
  shard_index,
  command 
)
Runs a test program shard and returns exit code and a list of tests run.

Definition at line 220 of file googletest-filter-unittest.py.

◆ SetEnvVar()

def googletest-filter-unittest.SetEnvVar (   env_var,
  value 
)
Sets the env variable to 'value'; unsets it when 'value' is None.

Definition at line 174 of file googletest-filter-unittest.py.

Variable Documentation

◆ ACTIVE_TESTS

list googletest-filter-unittest.ACTIVE_TESTS
Initial value:
1 = [
2  'FooTest.Abc',
3  'FooTest.Xyz',
4 
5  'BarTest.TestOne',
6  'BarTest.TestTwo',
7  'BarTest.TestThree',
8 
9  'BazTest.TestOne',
10  'BazTest.TestA',
11  'BazTest.TestB',
12  ] + DEATH_TESTS + PARAM_TESTS

Definition at line 154 of file googletest-filter-unittest.py.

◆ ALSO_RUN_DISABLED_TESTS_FLAG

string googletest-filter-unittest.ALSO_RUN_DISABLED_TESTS_FLAG = 'gtest_also_run_disabled_tests'

Definition at line 102 of file googletest-filter-unittest.py.

◆ CAN_PASS_EMPTY_ENV

googletest-filter-unittest.CAN_PASS_EMPTY_ENV = False

Definition at line 59 of file googletest-filter-unittest.py.

◆ CAN_TEST_EMPTY_FILTER

tuple googletest-filter-unittest.CAN_TEST_EMPTY_FILTER = (CAN_PASS_EMPTY_ENV and CAN_UNSET_ENV)

Definition at line 87 of file googletest-filter-unittest.py.

◆ CAN_UNSET_ENV

googletest-filter-unittest.CAN_UNSET_ENV = False

Definition at line 73 of file googletest-filter-unittest.py.

◆ child

googletest-filter-unittest.child
Initial value:
2  [sys.executable, '-c', 'import os; print(\'EMPTY_VAR\' in os.environ)'])

Definition at line 62 of file googletest-filter-unittest.py.

◆ COMMAND

googletest-filter-unittest.COMMAND = gtest_test_utils.GetTestExecutablePath('googletest-filter-unittest_')

Definition at line 105 of file googletest-filter-unittest.py.

◆ DEATH_TESTS

list googletest-filter-unittest.DEATH_TESTS
Initial value:
1 = [
2  'HasDeathTest.Test1',
3  'HasDeathTest.Test2',
4  ]

Definition at line 146 of file googletest-filter-unittest.py.

◆ DISABLED_TESTS

list googletest-filter-unittest.DISABLED_TESTS
Initial value:
1 = [
2  'BarTest.DISABLED_TestFour',
3  'BarTest.DISABLED_TestFive',
4  'BazTest.DISABLED_TestC',
5  'DISABLED_FoobarTest.Test1',
6  'DISABLED_FoobarTest.DISABLED_Test2',
7  'DISABLED_FoobarbazTest.TestA',
8  ]

Definition at line 136 of file googletest-filter-unittest.py.

◆ environ

googletest-filter-unittest.environ = os.environ.copy()

Definition at line 171 of file googletest-filter-unittest.py.

◆ FILTER_ENV_VAR

string googletest-filter-unittest.FILTER_ENV_VAR = 'GTEST_FILTER'

Definition at line 91 of file googletest-filter-unittest.py.

◆ FILTER_FLAG

string googletest-filter-unittest.FILTER_FLAG = 'gtest_filter'

Definition at line 99 of file googletest-filter-unittest.py.

◆ LIST_TESTS_FLAG

string googletest-filter-unittest.LIST_TESTS_FLAG = '--gtest_list_tests'

Definition at line 118 of file googletest-filter-unittest.py.

◆ PARAM_TEST_REGEX

googletest-filter-unittest.PARAM_TEST_REGEX = re.compile(r'/ParamTest')

Definition at line 108 of file googletest-filter-unittest.py.

◆ PARAM_TESTS

list googletest-filter-unittest.PARAM_TESTS
Initial value:
1 = [
2  'SeqP/ParamTest.TestX/0',
3  'SeqP/ParamTest.TestX/1',
4  'SeqP/ParamTest.TestY/0',
5  'SeqP/ParamTest.TestY/1',
6  'SeqQ/ParamTest.TestX/0',
7  'SeqQ/ParamTest.TestX/1',
8  'SeqQ/ParamTest.TestY/0',
9  'SeqQ/ParamTest.TestY/1',
10  ]

Definition at line 125 of file googletest-filter-unittest.py.

◆ param_tests_present

googletest-filter-unittest.param_tests_present = None

Definition at line 167 of file googletest-filter-unittest.py.

◆ SHARD_INDEX_ENV_VAR

string googletest-filter-unittest.SHARD_INDEX_ENV_VAR = 'GTEST_SHARD_INDEX'

Definition at line 95 of file googletest-filter-unittest.py.

◆ SHARD_STATUS_FILE_ENV_VAR

string googletest-filter-unittest.SHARD_STATUS_FILE_ENV_VAR = 'GTEST_SHARD_STATUS_FILE'

Definition at line 96 of file googletest-filter-unittest.py.

◆ SUPPORTS_DEATH_TESTS

string googletest-filter-unittest.SUPPORTS_DEATH_TESTS
Initial value:
1 = 'HasDeathTest' in gtest_test_utils.Subprocess(
2  [COMMAND, LIST_TESTS_FLAG]).output

Definition at line 121 of file googletest-filter-unittest.py.

◆ TEST_CASE_REGEX

googletest-filter-unittest.TEST_CASE_REGEX = re.compile(r'^\[\-+\] \d+ tests? from (\w+(/\w+)?)')

Definition at line 111 of file googletest-filter-unittest.py.

◆ TEST_REGEX

googletest-filter-unittest.TEST_REGEX = re.compile(r'^\[\s*RUN\s*\].*\.(\w+(/\w+)?)')

Definition at line 114 of file googletest-filter-unittest.py.

◆ TOTAL_SHARDS_ENV_VAR

string googletest-filter-unittest.TOTAL_SHARDS_ENV_VAR = 'GTEST_TOTAL_SHARDS'

Definition at line 94 of file googletest-filter-unittest.py.

gtest_test_utils.Subprocess
Definition: gtest_test_utils.py:202


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:10