Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Side by Side Diff: telemetry/telemetry/core/platform.py

Issue 2941123002: [Telemetry] Move discover to common/py_utils (Closed)
Patch Set: fix imports Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2012 The Chromium Authors. All rights reserved. 1 # Copyright 2012 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 import logging as real_logging 4 import logging as real_logging
5 import os 5 import os
6 import sys 6 import sys
7 7
8 from telemetry.core import discover
9 from telemetry.core import local_server 8 from telemetry.core import local_server
10 from telemetry.core import memory_cache_http_server 9 from telemetry.core import memory_cache_http_server
11 from telemetry.core import network_controller 10 from telemetry.core import network_controller
12 from telemetry.core import tracing_controller 11 from telemetry.core import tracing_controller
13 from telemetry.core import util 12 from telemetry.core import util
14 from telemetry.internal.platform import (platform_backend as 13 from telemetry.internal.platform import (platform_backend as
15 platform_backend_module) 14 platform_backend_module)
16 15
16 from py_utils import discover
17
17 _host_platform = None 18 _host_platform = None
18 # Remote platform is a dictionary from device ids to remote platform instances. 19 # Remote platform is a dictionary from device ids to remote platform instances.
19 _remote_platforms = {} 20 _remote_platforms = {}
20 21
21 22
22 def _InitHostPlatformIfNeeded(): 23 def _InitHostPlatformIfNeeded():
23 global _host_platform 24 global _host_platform
24 if _host_platform: 25 if _host_platform:
25 return 26 return
26 backend = None 27 backend = None
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 def HasBattOrConnected(self): 423 def HasBattOrConnected(self):
423 return self._platform_backend.HasBattOrConnected() 424 return self._platform_backend.HasBattOrConnected()
424 425
425 def WaitForBatteryTemperature(self, temp): 426 def WaitForBatteryTemperature(self, temp):
426 """Waits for the battery on the device under test to cool down to temp. 427 """Waits for the battery on the device under test to cool down to temp.
427 428
428 Args: 429 Args:
429 temp: temperature target in degrees C. 430 temp: temperature target in degrees C.
430 """ 431 """
431 return self._platform_backend.WaitForBatteryTemperature(temp) 432 return self._platform_backend.WaitForBatteryTemperature(temp)
OLDNEW
« no previous file with comments | « telemetry/telemetry/core/discover_unittest.py ('k') | telemetry/telemetry/internal/platform/profiler/profiler_finder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698