| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import json | 5 import json |
| 6 import os | 6 import os |
| 7 | 7 |
| 8 from slave import recipe_api | 8 from recipe_engine import recipe_api |
| 9 from . import perf_test | 9 from . import perf_test |
| 10 | 10 |
| 11 BUCKET = 'chrome-perf' | 11 BUCKET = 'chrome-perf' |
| 12 RESULTS_GS_DIR = 'bisect-results' | 12 RESULTS_GS_DIR = 'bisect-results' |
| 13 | 13 |
| 14 | 14 |
| 15 class BisectTesterApi(recipe_api.RecipeApi): | 15 class BisectTesterApi(recipe_api.RecipeApi): |
| 16 """A module for the bisect tester bot using the chromium recipe.""" | 16 """A module for the bisect tester bot using the chromium recipe.""" |
| 17 | 17 |
| 18 def __init__(self, **kwargs): | 18 def __init__(self, **kwargs): |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 url = "http://build.chromium.org/p/%s/json/builders/%s/builds/%s" % ( | 81 url = "http://build.chromium.org/p/%s/json/builders/%s/builds/%s" % ( |
| 82 self.m.properties['mastername'], | 82 self.m.properties['mastername'], |
| 83 self.m.properties['buildername'], | 83 self.m.properties['buildername'], |
| 84 self.m.properties['buildnumber']) | 84 self.m.properties['buildnumber']) |
| 85 local_save_results = self.m.python('saving url to temp file', | 85 local_save_results = self.m.python('saving url to temp file', |
| 86 self.resource('put_temp.py'), | 86 self.resource('put_temp.py'), |
| 87 stdout=self.m.raw_io.output(), | 87 stdout=self.m.raw_io.output(), |
| 88 stdin=self.m.raw_io.input(url)) | 88 stdin=self.m.raw_io.input(url)) |
| 89 local_file = local_save_results.stdout.splitlines()[0].strip() | 89 local_file = local_save_results.stdout.splitlines()[0].strip() |
| 90 self.m.gsutil.upload(local_file, BUCKET, gs_filename, name=str(gs_filename)) | 90 self.m.gsutil.upload(local_file, BUCKET, gs_filename, name=str(gs_filename)) |
| OLD | NEW |