| OLD | NEW | 
|    1 #!/usr/bin/env python |    1 #!/usr/bin/env python | 
|    2 # Copyright 2013 the V8 project authors. All rights reserved. |    2 # Copyright 2013 the V8 project authors. All rights reserved. | 
|    3 # Redistribution and use in source and binary forms, with or without |    3 # Redistribution and use in source and binary forms, with or without | 
|    4 # modification, are permitted provided that the following conditions are |    4 # modification, are permitted provided that the following conditions are | 
|    5 # met: |    5 # met: | 
|    6 # |    6 # | 
|    7 #     * Redistributions of source code must retain the above copyright |    7 #     * Redistributions of source code must retain the above copyright | 
|    8 #       notice, this list of conditions and the following disclaimer. |    8 #       notice, this list of conditions and the following disclaimer. | 
|    9 #     * Redistributions in binary form must reproduce the above |    9 #     * Redistributions in binary form must reproduce the above | 
|   10 #       copyright notice, this list of conditions and the following |   10 #       copyright notice, this list of conditions and the following | 
| (...skipping 19 matching lines...) Expand all  Loading... | 
|   30 import datetime |   30 import datetime | 
|   31 import httplib |   31 import httplib | 
|   32 import imp |   32 import imp | 
|   33 import json |   33 import json | 
|   34 import os |   34 import os | 
|   35 import re |   35 import re | 
|   36 import subprocess |   36 import subprocess | 
|   37 import sys |   37 import sys | 
|   38 import textwrap |   38 import textwrap | 
|   39 import time |   39 import time | 
 |   40 import urllib | 
|   40 import urllib2 |   41 import urllib2 | 
|   41  |   42  | 
|   42 from git_recipes import GitRecipesMixin |   43 from git_recipes import GitRecipesMixin | 
|   43 from git_recipes import GitFailedException |   44 from git_recipes import GitFailedException | 
|   44  |   45  | 
|   45 PERSISTFILE_BASENAME = "PERSISTFILE_BASENAME" |   46 PERSISTFILE_BASENAME = "PERSISTFILE_BASENAME" | 
|   46 BRANCHNAME = "BRANCHNAME" |   47 BRANCHNAME = "BRANCHNAME" | 
|   47 DOT_GIT_LOCATION = "DOT_GIT_LOCATION" |   48 DOT_GIT_LOCATION = "DOT_GIT_LOCATION" | 
|   48 VERSION_FILE = "VERSION_FILE" |   49 VERSION_FILE = "VERSION_FILE" | 
|   49 CHANGELOG_FILE = "CHANGELOG_FILE" |   50 CHANGELOG_FILE = "CHANGELOG_FILE" | 
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  202  |  203  | 
|  203   def ReadURL(self, url, params=None): |  204   def ReadURL(self, url, params=None): | 
|  204     # pylint: disable=E1121 |  205     # pylint: disable=E1121 | 
|  205     url_fh = urllib2.urlopen(url, params, 60) |  206     url_fh = urllib2.urlopen(url, params, 60) | 
|  206     try: |  207     try: | 
|  207       return url_fh.read() |  208       return url_fh.read() | 
|  208     finally: |  209     finally: | 
|  209       url_fh.close() |  210       url_fh.close() | 
|  210  |  211  | 
|  211   def ReadClusterFuzzAPI(self, api_key, **params): |  212   def ReadClusterFuzzAPI(self, api_key, **params): | 
|  212     params["api_key"] = api_key |  213     params["api_key"] = api_key.strip() | 
|  213     params = urllib.urlencode(params) |  214     params = urllib.urlencode(params) | 
|  214  |  215  | 
|  215     headers = {"Content-type": "application/x-www-form-urlencoded"} |  216     headers = {"Content-type": "application/x-www-form-urlencoded"} | 
|  216  |  217  | 
|  217     conn = httplib.HTTPSConnection("backend-dot-cluster-fuzz.appspot.com") |  218     conn = httplib.HTTPSConnection("backend-dot-cluster-fuzz.appspot.com") | 
|  218     conn.request("POST", "/_api/", params, headers) |  219     conn.request("POST", "/_api/", params, headers) | 
|  219  |  220  | 
|  220     response = conn.getresponse() |  221     response = conn.getresponse() | 
|  221     data = response.read() |  222     data = response.read() | 
|  222  |  223  | 
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  617     for (number, step_class) in enumerate(step_classes): |  618     for (number, step_class) in enumerate(step_classes): | 
|  618       steps.append(MakeStep(step_class, number, self._state, self._config, |  619       steps.append(MakeStep(step_class, number, self._state, self._config, | 
|  619                             options, self._side_effect_handler)) |  620                             options, self._side_effect_handler)) | 
|  620     for step in steps[options.step:]: |  621     for step in steps[options.step:]: | 
|  621       if step.Run(): |  622       if step.Run(): | 
|  622         return 1 |  623         return 1 | 
|  623     return 0 |  624     return 0 | 
|  624  |  625  | 
|  625   def Run(self, args=None): |  626   def Run(self, args=None): | 
|  626     return self.RunSteps(self._Steps(), args) |  627     return self.RunSteps(self._Steps(), args) | 
| OLD | NEW |