Bug 1368438 - Make it possible to only schedule builds with |mach try|, r=chmanchester
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Thu, 15 Jun 2017 08:14:17 -0400
changeset 365064 64406d3921f3bce828aa9934fcc8a910403efda3
parent 365063 79f9200b6cc1a7109b57d44be2f0fc8219b49bb5
child 365065 8f29b2c912151284f4c47a2d95c11ad2231c2216
push id32058
push userkwierso@gmail.com
push dateWed, 21 Jun 2017 01:24:44 +0000
treeherdermozilla-central@c55e582aee5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1368438
milestone56.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 1368438 - Make it possible to only schedule builds with |mach try|, r=chmanchester Currently if no unittests, paths or tags are specified it will error out. MozReview-Commit-ID: O0y6V2Wwej
testing/mach_commands.py
testing/tools/autotry/autotry.py
--- a/testing/mach_commands.py
+++ b/testing/mach_commands.py
@@ -531,19 +531,16 @@ class PushToTry(MachCommandBase):
             if not all(item == [] for item in rv.itervalues()):
                 raise ValueError("Unexpected subitems in argument")
             return rv.keys()
         else:
             return rv
 
     def validate_args(self, **kwargs):
         from autotry import AutoTry
-        if not kwargs["paths"] and not kwargs["tests"] and not kwargs["tags"]:
-            print("Paths, tags, or tests must be specified as an argument to autotry.")
-            sys.exit(1)
 
         if kwargs["platforms"] is None:
             if 'AUTOTRY_PLATFORM_HINT' in os.environ:
                 kwargs["platforms"] = [os.environ['AUTOTRY_PLATFORM_HINT']]
             else:
                 print("Platforms must be specified as an argument to autotry.")
                 sys.exit(1)
 
--- a/testing/tools/autotry/autotry.py
+++ b/testing/tools/autotry/autotry.py
@@ -398,17 +398,18 @@ class AutoTry(object):
         for flavor, flavor_tests in paths_by_flavor.iteritems():
             suite = self.flavor_suites[flavor]
             if suite not in suites and (not intersection or suite in tests):
                 for job_name in self.flavor_jobs[flavor]:
                     for test in flavor_tests:
                         paths.add("%s:%s" % (flavor, test))
                     suites[job_name] = tests.get(suite, [])
 
-        if not suites:
+        # intersection implies tests are expected
+        if intersection and not suites:
             raise ValueError("No tests found matching filters")
 
         if extras.get('artifact'):
             rejected = []
             for suite in suites.keys():
                 if any([suite.startswith(c) for c in self.compiled_suites]):
                     rejected.append(suite)
             if rejected: