|
webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Public Member Functions | |
| def | __init__ (self, script_dir, build_dir_var_name='GTEST_BUILD_DIR', injected_os=os, injected_subprocess=subprocess, injected_build_dir_finder=_GetGtestBuildDir) |
| def | GetTestsToRun (self, args, named_configurations, built_configurations, available_configurations=CONFIGS, python_tests_to_skip=None) |
| def | RunTests (self, python_tests, binary_tests) |
Public Attributes | |
| os | |
| subprocess | |
| build_dir_finder | |
| build_dir_var_name | |
| script_dir | |
Provides facilities for running Python and binary tests for Google Test.
| def run_tests_util.TestRunner.__init__ | ( | self, | |
| script_dir, | |||
build_dir_var_name = 'GTEST_BUILD_DIR', |
|||
injected_os = os, |
|||
injected_subprocess = subprocess, |
|||
injected_build_dir_finder = _GetGtestBuildDir |
|||
| ) |
Initializes a TestRunner instance.
Args:
script_dir: File path to the calling script.
build_dir_var_name: Name of the env variable used to pass the
the build directory path to the invoked
tests.
injected_os: standard os module or a mock/stub for
testing.
injected_subprocess: standard subprocess module or a mock/stub
for testing
injected_build_dir_finder: function that determines the path to
the build directory.
| def run_tests_util.TestRunner.GetTestsToRun | ( | self, | |
| args, | |||
| named_configurations, | |||
| built_configurations, | |||
available_configurations = CONFIGS, |
|||
python_tests_to_skip = None |
|||
| ) |
Determines what tests should be run.
Args:
args: The list of non-option arguments from the command line.
named_configurations: The list of configurations specified via -c or -a.
built_configurations: True if -b has been specified.
available_configurations: a list of configurations available on the
current platform, injectable for testing.
python_tests_to_skip: a collection of (configuration, python test name)s
that need to be skipped.
Returns:
A tuple with 2 elements: the list of Python tests to run and the list of
binary tests to run.
| def run_tests_util.TestRunner.RunTests | ( | self, | |
| python_tests, | |||
| binary_tests | |||
| ) |
Runs Python and binary tests and reports results to the standard output.
Args:
python_tests: List of Python tests to run in the form of tuples
(build directory, Python test script).
binary_tests: List of binary tests to run in the form of tuples
(build directory, binary file).
Returns:
The exit code the program should pass into sys.exit().
| run_tests_util.TestRunner.build_dir_finder |
| run_tests_util.TestRunner.build_dir_var_name |
| run_tests_util.TestRunner.os |
| run_tests_util.TestRunner.script_dir |
| run_tests_util.TestRunner.subprocess |
1.8.13