Bug 1382827 - |mach try --artifact| should remove |--artifact| if "-nightly" platforms are requested. r?chmanchester
MozReview-Commit-ID: Dqle5sBlZNr
--- 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)))