Chromium Code Reviews| 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 contextlib | 5 import contextlib |
| 6 import json | 6 import json |
| 7 | 7 |
| 8 from recipe_engine import recipe_api | 8 from recipe_engine import recipe_api |
| 9 from recipe_engine import util as recipe_util | 9 from recipe_engine import util as recipe_util |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 36 return self._get_results_dir(test_run_id).join('results.zip') | 36 return self._get_results_dir(test_run_id).join('results.zip') |
| 37 | 37 |
| 38 def _get_results_unzipped_path(self, test_run_id): | 38 def _get_results_unzipped_path(self, test_run_id): |
| 39 return self._get_results_dir(test_run_id).join('unzipped_results') | 39 return self._get_results_dir(test_run_id).join('unzipped_results') |
| 40 | 40 |
| 41 def _get_results_logcat_path(self, test_run_id): | 41 def _get_results_logcat_path(self, test_run_id): |
| 42 return self._get_results_unzipped_path(test_run_id).join( | 42 return self._get_results_unzipped_path(test_run_id).join( |
| 43 'appurify_results', 'logcat.txt') | 43 'appurify_results', 'logcat.txt') |
| 44 | 44 |
| 45 def _get_api_key_file(self): | 45 def _get_api_key_file(self): |
| 46 # TODO(phajdan.jr): Remove path['build'] usage, http://crbug.com/437264 . | 46 # TODO(phajdan.jr): Remove infra_paths['build'] usage, http://crbug.com/4372 64 . |
|
Sergiy Byelozyorov
2016/04/26 14:41:06
nit: long line
| |
| 47 local_api_key_file = self.m.path['build'].join( | 47 local_api_key_file = self.m.infra_paths['build'].join( |
| 48 'site_config', '.amp_%s_key' % self.c.pool) | 48 'site_config', '.amp_%s_key' % self.c.pool) |
| 49 return local_api_key_file | 49 return local_api_key_file |
| 50 | 50 |
| 51 def _get_api_secret_file(self): | 51 def _get_api_secret_file(self): |
| 52 # TODO(phajdan.jr): Remove path['build'] usage, http://crbug.com/437264 . | 52 # TODO(phajdan.jr): Remove infra_paths['build'] usage, http://crbug.com/4372 64 . |
|
Sergiy Byelozyorov
2016/04/26 14:41:06
nit: long line
| |
| 53 local_api_secret_file = self.m.path['build'].join( | 53 local_api_secret_file = self.m.infra_paths['build'].join( |
| 54 'site_config', '.amp_%s_secret' % self.c.pool) | 54 'site_config', '.amp_%s_secret' % self.c.pool) |
| 55 return local_api_secret_file | 55 return local_api_secret_file |
| 56 | 56 |
| 57 def _ensure_keys_downloaded(self): | 57 def _ensure_keys_downloaded(self): |
| 58 local_api_key_file = self._get_api_key_file() | 58 local_api_key_file = self._get_api_key_file() |
| 59 if not self.m.path.exists(local_api_key_file): | 59 if not self.m.path.exists(local_api_key_file): |
| 60 self.m.gsutil.download_url(name='download amp api key', | 60 self.m.gsutil.download_url(name='download amp api key', |
| 61 url=self.c.api_key_file_url, | 61 url=self.c.api_key_file_url, |
| 62 dest=local_api_key_file) | 62 dest=local_api_key_file) |
| 63 self.m.path.mock_add_paths(local_api_key_file) | 63 self.m.path.mock_add_paths(local_api_key_file) |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 328 amp_args += ['--remote-device-timeout', device_timeout] | 328 amp_args += ['--remote-device-timeout', device_timeout] |
| 329 | 329 |
| 330 if network_config: | 330 if network_config: |
| 331 amp_args += ['--network-config', network_config] | 331 amp_args += ['--network-config', network_config] |
| 332 | 332 |
| 333 if test_run_timeout: | 333 if test_run_timeout: |
| 334 amp_args += ['--test-timeout', test_run_timeout] | 334 amp_args += ['--test-timeout', test_run_timeout] |
| 335 | 335 |
| 336 return amp_args | 336 return amp_args |
| 337 | 337 |
| OLD | NEW |