Bug 1400895 - Better try support for test-verify. r=ahal
authorJoel Maher <jmaher@mozilla.com>
Thu, 17 May 2018 06:19:49 -0400
changeset 1514240 fb27943d7f3254b5a2760322a74d0dc53d6e685f
parent 1514239 6f9e3a1389564acad97a6b9bde101365b67b0ba3
child 1514241 83f1086007168ebd57d9bbc38b30760ba8f5768b
child 1514254 abf9e04abb7298bf9cc341f21138c89f48d5bdbf
child 1514256 850601a8bb38e032931c16e92120f0d5afa5fd68
child 1514258 9797b04466067f3a1783c0bfb5889b8ef35e6477
child 1514353 6d589ac0354a02d48342304a47d262b5e256665d
child 1514365 11d80f8ffe9cf617a5accc7b446cec523f959f2e
child 1514387 097dcf70608ed07705fb4cf8ede368bc9363fed6
child 1514405 737e9b47fcc8a19d4bb84604b440140f0cea8f80
child 1514407 69c037e61704b2c9ecec8c2eb87f55c8985bd1ad
child 1514422 036c325edd3c53a916bc7153770223d05fa44372
child 1514424 3d9a85e11874e4d96fe7f474aedd1b891dee851e
child 1514516 757821f138f11e4f37c0658e911eeb80c2a78dd8
child 1514546 e7a6856d598987fe6f803dfd99e87a53ecebcf64
child 1514571 2963f57cf732579052cf02eec1b80d1f4e0b44f4
child 1514588 b4aef19a46e23c6344fc6d2dfa23d282bd9ec0a2
child 1514614 92d45fe9e2130487de15fdb005fea94e21d7a483
child 1514629 651e1690bca24b3db2d4a9a61e81bf9f9a389b54
child 1514633 ceea19b9925a65343b747dc8a525efe64de14dc3
child 1514638 3bd502137e72d2de08d96fc1223e07b6102fd03a
push id272229
push userjmaher@mozilla.com
push dateThu, 17 May 2018 10:40:22 +0000
treeherdertry@e653dea6a6c9 [default view] [failures only]
reviewersahal
bugs1400895
milestone62.0a1
Bug 1400895 - Better try support for test-verify. r=ahal
taskcluster/taskgraph/transforms/tests.py
tools/tryselect/selectors/fuzzy.py
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -837,18 +837,28 @@ def perfile_number_of_chunks(config, typ
     elif type.startswith('test-verify'):
         file_patterns = ['**/test_*',
                          '**/browser_*',
                          '**/crashtest*/**',
                          'js/src/test/test/',
                          'js/src/test/non262/',
                          'js/src/test/test262/']
 
-    changed_files = files_changed.get_changed_files(config.params.get('head_repository'),
-                                                    config.params.get('head_rev'))
+    changed_files = None
+    if config.params.get('try_task_config', None):
+        task_config = config.params.get('try_task_config', None)
+        if 'templates' in task_config.keys() and \
+           'env' in task_config['templates'].keys():
+            changed_files = task_config['templates']['env'].get('MOZHARNESS_TEST_PATHS', None)
+            if changed_files:
+                changed_files = changed_files.split(":")
+
+    if not changed_files:
+        changed_files = files_changed.get_changed_files(config.params.get('head_repository'),
+                                                        config.params.get('head_rev'))
     test_count = 0
     for pattern in file_patterns:
         for path in changed_files:
             if mozpackmatch(path, pattern):
                 gpu = False
                 if type == 'test-verify-e10s':
                     # file_patterns for test-verify will pick up some gpu tests, lets ignore
                     # in the case of reftest, we will not have any in the regular case
--- a/tools/tryselect/selectors/fuzzy.py
+++ b/tools/tryselect/selectors/fuzzy.py
@@ -182,16 +182,17 @@ def filter_by_paths(tasks, paths):
     for flavor, subsuite in flavors:
         suite = get_suite_definition(flavor, subsuite, strict=True)
         if 'task_regex' not in suite:
             print("warning: no tasks could be resolved from flavor '{}'{}".format(
                     flavor, " and subsuite '{}'".format(subsuite) if subsuite else ""))
             continue
 
         task_regexes.add(suite['task_regex'])
+    task_regexes.add('test-verify(?:-e10s)?(?:-[0-9])?$')
 
     def match_task(task):
         return any(re.search(pattern, task) for pattern in task_regexes)
 
     return filter(match_task, tasks)
 
 
 def run_fuzzy_try(update=False, query=None, templates=None, full=False, parameters=None,