diff options
author | Josh Matthews <josh@joshmatthews.net> | 2017-05-18 17:19:40 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2017-11-07 13:40:07 -0500 |
commit | c0f85579c5fabeed46f149cceaf1713a7b992086 (patch) | |
tree | 7c71464c14d92d0eefea1091d3c5b7525c743eb6 /python/servo/testing_commands.py | |
parent | 4a132437df3a7f0f8e238bf9c56f0d4fc677b7e7 (diff) | |
download | servo-c0f85579c5fabeed46f149cceaf1713a7b992086.tar.gz servo-c0f85579c5fabeed46f149cceaf1713a7b992086.zip |
Allow specifying alternative tracker endpoints.
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r-- | python/servo/testing_commands.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index c21def01243..3e744afdfec 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -517,9 +517,9 @@ class MachCommands(CommandBase): help='Print intermittents to file') @CommandArgument('--auth', default=None, help='File containing basic authorization credentials for Github API (format `username:password`)') - @CommandArgument('--use-tracker', default=False, action='store_true', - help='Use https://www.joshmatthews.net/intermittent-tracker') - def filter_intermittents(self, summary, log_filteredsummary, log_intermittents, auth, use_tracker): + @CommandArgument('--tracker-api', default=None, action='store', + help='The API endpoint for tracking known intermittent failures.') + def filter_intermittents(self, summary, log_filteredsummary, log_intermittents, auth, tracker_api): encoded_auth = None if auth: with open(auth, "r") as file: @@ -533,9 +533,14 @@ class MachCommands(CommandBase): actual_failures = [] intermittents = [] for failure in failures: - if use_tracker: + if tracker_api: + if tracker_api == 'default': + tracker_api = "http://build.servo.org/intermittent-tracker" + else if tracker_api.endswith('/'): + tracker_api = tracker_api[0:-1] + query = urllib2.quote(failure['test'], safe='') - request = urllib2.Request("http://build.servo.org/intermittent-tracker/query.py?name=%s" % query) + request = urllib2.Request("%s/query.py?name=%s" % (tracker_api, query)) search = urllib2.urlopen(request) data = json.load(search) if len(data) == 0: |