mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 938712 - Add --flavor to mach mochitest; r=AutomatedTester
`mach mochitest` now accepts a --flavor argument to limit execution to tests of a certain flavor. Executing `mach mochitest --flavor=X` should be equivalent to executing `mach mochitest-X`. This paves the road to deprecating the various `mach mochitest-X` commands. --HG-- extra : rebase_source : 0f8370425f54a4ec86e7f668bcbff69362e017f7
This commit is contained in:
parent
b3a110713e
commit
c15e536e73
@ -670,7 +670,9 @@ class MachCommands(MachCommandBase):
|
||||
conditions=[conditions.is_firefox],
|
||||
description='Run any flavor of mochitest.')
|
||||
@MochitestCommand
|
||||
def run_mochitest_general(self, test_paths, **kwargs):
|
||||
@CommandArgument('-f', '--flavor', choices=FLAVORS.keys(),
|
||||
help='Only run tests of this flavor.')
|
||||
def run_mochitest_general(self, test_paths, flavor=None, **kwargs):
|
||||
self._preruntest()
|
||||
|
||||
from mozbuild.testing import TestResolver
|
||||
@ -691,9 +693,13 @@ class MachCommands(MachCommandBase):
|
||||
|
||||
suites = {}
|
||||
for test in tests:
|
||||
# Filter out non-mochitests.
|
||||
if test['flavor'] not in FLAVORS:
|
||||
continue
|
||||
|
||||
if flavor and test['flavor'] != flavor:
|
||||
continue
|
||||
|
||||
suite = FLAVORS[test['flavor']]
|
||||
suites.setdefault(suite, []).append(test)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user