| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 io | 5 import io |
| 6 import json | 6 import json |
| 7 import logging | 7 import logging |
| 8 import os | 8 import os |
| 9 import pickle | 9 import pickle |
| 10 import shutil | 10 import shutil |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 | 327 |
| 328 def __init__(self, env, test_instance): | 328 def __init__(self, env, test_instance): |
| 329 super(LocalDevicePerfTestRun, self).__init__(env, test_instance) | 329 super(LocalDevicePerfTestRun, self).__init__(env, test_instance) |
| 330 self._devices = None | 330 self._devices = None |
| 331 self._env = env | 331 self._env = env |
| 332 self._no_device_tests = {} | 332 self._no_device_tests = {} |
| 333 self._test_buckets = [] | 333 self._test_buckets = [] |
| 334 self._test_instance = test_instance | 334 self._test_instance = test_instance |
| 335 self._timeout = None if test_instance.no_timeout else self._DEFAULT_TIMEOUT | 335 self._timeout = None if test_instance.no_timeout else self._DEFAULT_TIMEOUT |
| 336 | 336 |
| 337 #override |
| 337 def SetUp(self): | 338 def SetUp(self): |
| 338 if os.path.exists(constants.PERF_OUTPUT_DIR): | 339 if os.path.exists(constants.PERF_OUTPUT_DIR): |
| 339 shutil.rmtree(constants.PERF_OUTPUT_DIR) | 340 shutil.rmtree(constants.PERF_OUTPUT_DIR) |
| 340 os.makedirs(constants.PERF_OUTPUT_DIR) | 341 os.makedirs(constants.PERF_OUTPUT_DIR) |
| 341 | 342 |
| 343 #override |
| 342 def TearDown(self): | 344 def TearDown(self): |
| 343 pass | 345 pass |
| 344 | 346 |
| 345 def _GetStepsFromDict(self): | 347 def _GetStepsFromDict(self): |
| 346 # From where this is called one of these two must be set. | 348 # From where this is called one of these two must be set. |
| 347 if self._test_instance.single_step: | 349 if self._test_instance.single_step: |
| 348 return { | 350 return { |
| 349 'version': self._CONFIG_VERSION, | 351 'version': self._CONFIG_VERSION, |
| 350 'steps': { | 352 'steps': { |
| 351 'single_step': { | 353 'single_step': { |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 # override | 510 # override |
| 509 def _RunTest(self, _device, _test): | 511 def _RunTest(self, _device, _test): |
| 510 raise NotImplementedError | 512 raise NotImplementedError |
| 511 | 513 |
| 512 | 514 |
| 513 class TestDictVersionError(Exception): | 515 class TestDictVersionError(Exception): |
| 514 pass | 516 pass |
| 515 | 517 |
| 516 class PerfTestRunGetStepsError(Exception): | 518 class PerfTestRunGetStepsError(Exception): |
| 517 pass | 519 pass |
| OLD | NEW |