Bug 1209701 - Don't require platforms as input to |./mach try| if set in the environment. r=jgraham

This commit is contained in:
Chris Manchester 2015-09-30 16:38:20 -07:00
parent f2d86499e5
commit 646da50710
2 changed files with 3 additions and 3 deletions

View File

@ -465,8 +465,7 @@ class PushToTry(MachCommandBase):
sys.exit(1)
if kwargs["platforms"] is None:
print("Platforms must be specified as an argument to autotry")
sys.exit(1)
kwargs["platforms"] = [os.environ['AUTOTRY_PLATFORM_HINT']]
try:
platforms = self.normalise_list(kwargs["platforms"])

View File

@ -21,7 +21,8 @@ def arg_parser():
parser.add_argument('-b', dest='builds', default='do',
help='Build types to run (d for debug, o for optimized).')
parser.add_argument('-p', dest='platforms', action="append",
help='Platforms to run (required if not found in the environment).')
required='AUTOTRY_PLATFORM_HINT' not in os.environ,
help='Platforms to run (required if not found in the environment as AUTOTRY_PLATFORM_HINT).')
parser.add_argument('-u', dest='tests', action="append",
help='Test suites to run in their entirety.')
parser.add_argument('-t', dest="talos", action="append",