зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1714680 - Implement `mach gtest --list-tests` r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D116904
This commit is contained in:
Родитель
834c030225
Коммит
084cf95676
|
@ -561,7 +561,13 @@ class GTestCommands(MachCommandBase):
|
|||
metavar="gtest_filter",
|
||||
help="test_filter is a ':'-separated list of wildcard patterns "
|
||||
"(called the positive patterns), optionally followed by a '-' "
|
||||
"and another ':'-separated pattern list (called the negative patterns).",
|
||||
"and another ':'-separated pattern list (called the negative patterns)."
|
||||
"Test names are of the format SUITE.NAME. Use --list-tests to see all.",
|
||||
)
|
||||
@CommandArgument(
|
||||
"--list-tests",
|
||||
action="store_true",
|
||||
help="list all available tests",
|
||||
)
|
||||
@CommandArgument(
|
||||
"--jobs",
|
||||
|
@ -655,6 +661,7 @@ class GTestCommands(MachCommandBase):
|
|||
shuffle,
|
||||
jobs,
|
||||
gtest_filter,
|
||||
list_tests,
|
||||
tbpl_parser,
|
||||
enable_webrender,
|
||||
package,
|
||||
|
@ -730,6 +737,9 @@ class GTestCommands(MachCommandBase):
|
|||
if sys.platform.startswith("win") and "MOZ_LAUNCHER_PROCESS" in self.defines:
|
||||
args.append("--wait-for-browser")
|
||||
|
||||
if list_tests:
|
||||
args.append("--gtest_list_tests")
|
||||
|
||||
if debug or debugger or debugger_args:
|
||||
args = _prepend_debugger_args(args, debugger, debugger_args)
|
||||
if not args:
|
||||
|
@ -737,7 +747,7 @@ class GTestCommands(MachCommandBase):
|
|||
|
||||
# Use GTest environment variable to control test execution
|
||||
# For details see:
|
||||
# https://code.google.com/p/googletest/wiki/AdvancedGuide#Running_Test_Programs:_Advanced_Options
|
||||
# https://google.github.io/googletest/advanced.html#running-test-programs-advanced-options
|
||||
gtest_env = {b"GTEST_FILTER": gtest_filter}
|
||||
|
||||
# Note: we must normalize the path here so that gtest on Windows sees
|
||||
|
|
Загрузка…
Ссылка в новой задаче