Bug 1210481 - Fix interaction between saved try strings and platform environment variable in mach try, r=chmanchester

This commit is contained in:
James Graham 2015-10-01 14:52:29 +01:00
parent d653a6fa32
commit 23fe91bef1
2 changed files with 5 additions and 2 deletions

View File

@ -504,7 +504,11 @@ class PushToTry(MachCommandBase):
sys.exit(1)
if kwargs["platforms"] is None:
kwargs["platforms"] = [os.environ['AUTOTRY_PLATFORM_HINT']]
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)
try:
platforms = self.normalise_list(kwargs["platforms"])

View File

@ -21,7 +21,6 @@ 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",
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.')