зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1670240 - [tryselect] Use the 'TestManifestLoader' when resolving test paths r=jmaher
This walks the file system to read moz.build files, rather than following the DIRS traversal. The latter is problematic because many moz.build files that happen to define manifests could be excluded by the local build config. Differential Revision: https://phabricator.services.mozilla.com/D94197
This commit is contained in:
Родитель
bbe7b7b35e
Коммит
635fc5d710
|
@ -13,7 +13,7 @@ from collections import defaultdict
|
|||
from mozboot.util import get_state_dir
|
||||
from mozbuild.base import MozbuildObject
|
||||
from mozpack.files import FileFinder
|
||||
from moztest.resolve import TestResolver, get_suite_definition
|
||||
from moztest.resolve import TestResolver, TestManifestLoader, get_suite_definition
|
||||
|
||||
import taskgraph
|
||||
from taskgraph.generator import TaskGraphGenerator
|
||||
|
@ -116,7 +116,7 @@ def generate_tasks(params=None, full=False, disable_target_task_filter=False):
|
|||
|
||||
|
||||
def filter_tasks_by_paths(tasks, paths):
|
||||
resolver = TestResolver.from_environment(cwd=here)
|
||||
resolver = TestResolver.from_environment(cwd=here, loader_cls=TestManifestLoader)
|
||||
run_suites, run_tests = resolver.resolve_metadata(paths)
|
||||
flavors = set([(t['flavor'], t.get('subsuite')) for t in run_tests])
|
||||
|
||||
|
@ -137,7 +137,7 @@ def filter_tasks_by_paths(tasks, paths):
|
|||
|
||||
|
||||
def resolve_tests_by_suite(paths):
|
||||
resolver = TestResolver.from_environment(cwd=here)
|
||||
resolver = TestResolver.from_environment(cwd=here, loader_cls=TestManifestLoader)
|
||||
_, run_tests = resolver.resolve_metadata(paths)
|
||||
|
||||
suite_to_tests = defaultdict(list)
|
||||
|
|
Загрузка…
Ссылка в новой задаче