Backed out changeset efec1285a2a1 (bug 1281570) as part of the backout of bug 1258451
authorChris Manchester <cmanchester@mozilla.com>
Wed, 29 Jun 2016 13:12:17 -0700
changeset 328253 ea448e55b6426a2afc24e29c38e66813a6dc0c70
parent 328252 6de4b5024668797c8f99d4222f93ad62e5f28899
child 328254 38ac7e2815b3ba688bd9b49fda912c6cc7f316f2
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1281570, 1258451
milestone50.0a1
backs outefec1285a2a18a1fef1c6242b22d72638e088330
Backed out changeset efec1285a2a1 (bug 1281570) as part of the backout of bug 1258451 MozReview-Commit-ID: KaUcqC4Es6Z
testing/mach_commands.py
testing/tools/autotry/autotry.py
--- a/testing/mach_commands.py
+++ b/testing/mach_commands.py
@@ -480,17 +480,16 @@ class JsapiTestsCommand(MachCommandBase)
         if params['test_name']:
             jsapi_tests_cmd.append(params['test_name'])
 
         jsapi_tests_result = subprocess.call(jsapi_tests_cmd)
 
         return jsapi_tests_result
 
 def autotry_parser():
-    print("mach try is under development, please file bugs blocking 1149670.")
     from autotry import arg_parser
     return arg_parser()
 
 @CommandProvider
 class PushToTry(MachCommandBase):
     def normalise_list(self, items, allow_subitems=False):
         from autotry import parse_arg
 
@@ -610,16 +609,18 @@ class PushToTry(MachCommandBase):
         installable from mach mercurial-setup) or a git repo using git-cinnabar
         (available at https://github.com/glandium/git-cinnabar).
 
         """
 
         from mozbuild.testing import TestResolver
         from autotry import AutoTry
 
+        print("mach try is under development, please file bugs blocking 1149670.")
+
         resolver_func = lambda: self._spawn(TestResolver)
         at = AutoTry(self.topsrcdir, resolver_func, self._mach_context)
 
         if kwargs["list"]:
             at.list_presets()
             sys.exit()
 
         if kwargs["load"] is not None:
--- a/testing/tools/autotry/autotry.py
+++ b/testing/tools/autotry/autotry.py
@@ -4,39 +4,26 @@
 
 import argparse
 import itertools
 import os
 import re
 import subprocess
 import sys
 import which
-import difflib
 
 from collections import defaultdict
 
 import ConfigParser
 
 def validate_choices(values, choices):
-    valid = True
     for value in values:
-        corrections = difflib.get_close_matches(value, choices)
-        if len(corrections) == 0:
-            print 'Potentially invalid choice {v!r}. Neither the requested value nor a similar value was found.'.format(v=value)
-            print 'List of possible values: {c!r}'.format(c=choices)
-            result = raw_input('Are you sure you want to continue? [y/N] ').strip()
-            if not 'y' in result.lower():
-                valid = False
-        elif corrections[0] == value:
-            continue
-        else:
-            valid = False
-            print 'Invalid choice {v!r}. Some suggestions (limit three): {c!r}?'.format(v=value, c=corrections)
-    if not valid:
-        sys.exit(1)
+        if value not in choices:
+            print 'Invalid choice {v!r}. Allowed choices: {c!r}'.format(v=value, c=choices)
+            sys.exit(1)
 
 class ValidatePlatforms(argparse.Action):
     def __call__(self, parser, args, values, option_string=None):
         choices = ['linux', 'linux64', 'linux64-asan', 'linux64-st-an',
                    'linux64-valgrind', 'linux64-haz', 'macosx64',
                    'macosx64-st-an', 'win32', 'win64', 'android-api-9',
                    'android-api-15', 'android-api-15-gradle-dependencies',
                    'android-api-15-frontend', 'android-x86', 'sm-arm-sim',