Bug 1541424 - ensure path expansion in mach try respects manifest annotations r=ahal,marco
authorEdwin Gao <egao@mozilla.com>
Thu, 25 Jul 2019 17:10:43 +0000
changeset 484748 3ccd3e9f16a2dee28372895c3ea4294c09b4f647
parent 484747 11a3b334b9514fd2d4d31030e2e1aba567ffb068
child 484749 d025c39278a3d7e72ce44b031455d64d5ec89a50
push id36347
push usercsabou@mozilla.com
push dateFri, 26 Jul 2019 03:42:45 +0000
treeherdermozilla-central@8b544aa4209a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal, marco
bugs1541424
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1541424 - ensure path expansion in mach try respects manifest annotations r=ahal,marco Differential Revision: https://phabricator.services.mozilla.com/D38771
tools/tryselect/tasks.py
--- a/tools/tryselect/tasks.py
+++ b/tools/tryselect/tasks.py
@@ -134,13 +134,20 @@ def filter_tasks_by_paths(tasks, paths):
     return filter(match_task, tasks)
 
 
 def resolve_tests_by_suite(paths):
     resolver = TestResolver.from_environment(cwd=here)
     _, run_tests = resolver.resolve_metadata(paths)
 
     suite_to_tests = defaultdict(list)
+
     for test in run_tests:
         key, _ = get_suite_definition(test['flavor'], test.get('subsuite'), strict=True)
-        suite_to_tests[key].append(test['srcdir_relpath'])
+
+        # Passing test files will ignore mochitest manifest conditions (see bug 1541424).
+        if test.get('dir_relpath') in paths and test['dir_relpath'] not in suite_to_tests[key]:
+            suite_to_tests[key].append(test['dir_relpath'])
+        elif (test.get('srcdir_relpath') in paths and
+              test['srcdir_relpath'] not in suite_to_tests[key]):
+            suite_to_tests[key].append(test['srcdir_relpath'])
 
     return suite_to_tests