| 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 json | 5 import json |
| 6 import os | 6 import os |
| 7 import re | 7 import re |
| 8 import sys | 8 import sys |
| 9 | 9 |
| 10 from common.clovis_task import ClovisTask | 10 from common.clovis_task import ClovisTask |
| 11 from common.loading_trace_database import LoadingTraceDatabase |
| 11 import controller | 12 import controller |
| 12 from failure_database import FailureDatabase | 13 from failure_database import FailureDatabase |
| 13 import loading_trace | 14 import loading_trace |
| 14 from loading_trace_database import LoadingTraceDatabase | |
| 15 import options | 15 import options |
| 16 | 16 |
| 17 | 17 |
| 18 class TraceTaskHandler(object): | 18 class TraceTaskHandler(object): |
| 19 """Handles 'trace' tasks.""" | 19 """Handles 'trace' tasks.""" |
| 20 | 20 |
| 21 def __init__(self, base_path, failure_database, | 21 def __init__(self, base_path, failure_database, |
| 22 google_storage_accessor, binaries_path, logger, | 22 google_storage_accessor, binaries_path, logger, |
| 23 instance_name=None): | 23 instance_name=None): |
| 24 """Args: | 24 """Args: |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 url, emulate_device, emulate_network, local_filename, log_filename) | 208 url, emulate_device, emulate_network, local_filename, log_filename) |
| 209 if trace_metadata['succeeded']: | 209 if trace_metadata['succeeded']: |
| 210 success_happened = True | 210 success_happened = True |
| 211 remote_filename = os.path.join(local_filename, str(repeat)) | 211 remote_filename = os.path.join(local_filename, str(repeat)) |
| 212 self._HandleTraceGenerationResults( | 212 self._HandleTraceGenerationResults( |
| 213 local_filename, log_filename, remote_filename, trace_metadata) | 213 local_filename, log_filename, remote_filename, trace_metadata) |
| 214 | 214 |
| 215 if success_happened: | 215 if success_happened: |
| 216 self._UploadTraceDatabase() | 216 self._UploadTraceDatabase() |
| 217 | 217 |
| OLD | NEW |