Bug 1382827 - |mach try --artifact| should remove |--artifact| if "-nightly" platforms are requested. r?chmanchester draft
authorEd Lee <edilee@mozilla.com>
Thu, 20 Jul 2017 13:37:31 -0700
changeset 612563 f8765b34f81a4586fca8bbdb26dea26b1051c19b
parent 611713 a8885191775ad1f655d2826f8f8e943a9a985f43
child 638444 e9801ab6fd69e2d4f4c8c4fc237470068d191a14
push id69535
push userbmo:edilee@mozilla.com
push dateThu, 20 Jul 2017 20:38:25 +0000
reviewerschmanchester
bugs1382827
milestone56.0a1
Bug 1382827 - |mach try --artifact| should remove |--artifact| if "-nightly" platforms are requested. r?chmanchester MozReview-Commit-ID: Dqle5sBlZNr
testing/tools/autotry/autotry.py
--- a/testing/tools/autotry/autotry.py
+++ b/testing/tools/autotry/autotry.py
@@ -406,16 +406,21 @@ class AutoTry(object):
                     for test in flavor_tests:
                         paths.add("%s:%s" % (flavor, test))
                     suites[job_name] = tests.get(suite, [])
 
         # intersection implies tests are expected
         if intersection and not suites:
             raise ValueError("No tests found matching filters")
 
+        if extras.get('artifact') and any([p.endswith("-nightly") for p in platforms]):
+            print('You asked for |--artifact| but "-nightly" platforms don\'t have artifacts. '
+                  'Running without |--artifact| instead.')
+            del extras['artifact'];
+
         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:
                 raise ValueError("You can't run {} with "
                                  "--artifact option.".format(', '.join(rejected)))