Torque2D Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Namespace List
- Namespace Members

Classes | Functions | Variables
gtest_filter_unittest Namespace Reference

## Classes
class | GTestFilterUnitTest

## Functions
def | SetEnvVar (env_var, value)
def | RunAndReturnOutput
def | RunAndExtractTestList
def | InvokeWithModifiedEnv (extra_env, function, args, kwargs)
def | RunWithSharding (total_shards, shard_index, command)

## Variables
string | __author__ = 'wan@google.com (Zhanyong Wan)'
tuple | child
tuple | CAN_PASS_EMPTY_ENV = eval(child.output)
tuple | CAN_UNSET_ENV = eval(child.output)
tuple | CAN_TEST_EMPTY_FILTER = (CAN_PASS_EMPTY_ENV and CAN_UNSET_ENV)
string | FILTER_ENV_VAR = 'GTEST_FILTER'
string | TOTAL_SHARDS_ENV_VAR = 'GTEST_TOTAL_SHARDS'
string | SHARD_INDEX_ENV_VAR = 'GTEST_SHARD_INDEX'
string | SHARD_STATUS_FILE_ENV_VAR = 'GTEST_SHARD_STATUS_FILE'
string | FILTER_FLAG = 'gtest_filter'
string | ALSO_RUN_DISABED_TESTS_FLAG = 'gtest_also_run_disabled_tests'
tuple | COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_filter_unittest_')
tuple | PARAM_TEST_REGEX = re.compile(r'/ParamTest')
tuple | TEST_CASE_REGEX = re.compile(r'^\[\-+\] \d+ tests? from (\w+(/\w+)?)')
tuple | TEST_REGEX = re.compile(r'^\[\s*RUN\s*\].*\.(\w+(/\w+)?)')
string | LIST_TESTS_FLAG = '--gtest_list_tests'
string | SUPPORTS_DEATH_TESTS = 'HasDeathTest'
list | PARAM_TESTS
list | DISABLED_TESTS
list | DEATH_TESTS
list | ACTIVE_TESTS
| param_tests_present = None
tuple | environ = os.environ.copy()

## Function Documentation

def gtest_filter_unittest.InvokeWithModifiedEnv | ( |  | extra_env,
|  |  | function,
|  |  | args,
|  |  | kwargs
| ) |  |

    Runs the given function and arguments in a modified environment.

def gtest_filter_unittest.RunAndExtractTestList | ( |  | args = `None` | ) |

    Runs the test program and returns its exit code and a list of tests run.

def gtest_filter_unittest.RunAndReturnOutput | ( |  | args = `None` | ) |

    Runs the test program and returns its output.

def gtest_filter_unittest.RunWithSharding | ( |  | total_shards,
|  |  | shard_index,
|  |  | command
| ) |  |

    Runs a test program shard and returns exit code and a list of tests run.

def gtest_filter_unittest.SetEnvVar | ( |  | env_var,
|  |  | value
| ) |  |

    Sets the env variable to 'value'; unsets it when 'value' is None.

## Variable Documentation

string __author__ = 'wan@google.com (Zhanyong Wan)'

list 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 ]

string ALSO_RUN_DISABED_TESTS_FLAG = 'gtest_also_run_disabled_tests'

tuple CAN_PASS_EMPTY_ENV = eval(child.output)

tuple CAN_TEST_EMPTY_FILTER = (CAN_PASS_EMPTY_ENV and CAN_UNSET_ENV)

tuple CAN_UNSET_ENV = eval(child.output)

tuple child

Initial value:
1 = gtest_test_utils.Subprocess(
2 [sys.executable, '-c', 'import os; print \'EMPTY_VAR\' in os.environ'])
gtest_test_utils.Subprocess
Definition: gtest_test_utils.py:192

tuple COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_filter_unittest_')

list DEATH_TESTS

Initial value:
1 = [
2 'HasDeathTest.Test1',
3 'HasDeathTest.Test2',
4 ]

list 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 ]

tuple environ = os.environ.copy()

string FILTER_ENV_VAR = 'GTEST_FILTER'

string FILTER_FLAG = 'gtest_filter'

string LIST_TESTS_FLAG = '--gtest_list_tests'

tuple PARAM_TEST_REGEX = re.compile(r'/ParamTest')

list 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 ]

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 = 'HasDeathTest'

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

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

string TOTAL_SHARDS_ENV_VAR = 'GTEST_TOTAL_SHARDS'