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

Unified Diff: tools/telemetry/telemetry/internal/platform/ios_device.py

Issue 1647513002: Delete tools/telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/internal/platform/ios_device.py
diff --git a/tools/telemetry/telemetry/internal/platform/ios_device.py b/tools/telemetry/telemetry/internal/platform/ios_device.py
deleted file mode 100644
index fac02807ceb47f7eb2d081eb3832baef1d8e2faf..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/internal/platform/ios_device.py
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import logging
-import re
-import subprocess
-
-from telemetry.core import platform
-from telemetry.internal.platform import device
-
-
-IOSSIM_BUILD_DIRECTORIES = [
- 'Debug-iphonesimulator',
- 'Profile-iphonesimulator',
- 'Release-iphonesimulator'
-]
-
-class IOSDevice(device.Device):
- def __init__(self):
- super(IOSDevice, self).__init__(name='ios', guid='ios')
-
- @classmethod
- def GetAllConnectedDevices(cls, blacklist):
- return []
-
-
-def _IsIosDeviceAttached():
- devices = subprocess.check_output('system_profiler SPUSBDataType', shell=True)
- for line in devices.split('\n'):
- if line and re.match(r'\s*(iPod|iPhone|iPad):', line):
- return True
- return False
-
-def _IsIosSimulatorAvailable(chrome_root):
- """Determines whether an iOS simulator is present in the local checkout.
-
- Assumes the iOS simulator (iossim) and Chromium have already been built.
-
- Returns:
- True if at least one simulator is found, otherwise False.
- """
- for build_dir in IOSSIM_BUILD_DIRECTORIES:
- iossim_path = os.path.join(
- chrome_root, 'out', build_dir, 'iossim')
- chromium_path = os.path.join(
- chrome_root, 'out', build_dir, 'Chromium.app')
-
- # If the iOS simulator and Chromium app are present, return True
- if os.path.exists(iossim_path) and os.path.exists(chromium_path):
- return True
-
- return False
-
-def FindAllAvailableDevices(options):
- """Returns a list of available devices.
- """
- # TODO(baxley): Add support for all platforms possible. Probably Linux,
- # probably not Windows.
- if platform.GetHostPlatform().GetOSName() != 'mac':
- return []
-
- if options.chrome_root is None:
- logging.warning('--chrome-root is not specified, skip iOS simulator tests.')
- return []
-
- if (not _IsIosDeviceAttached() and not
- _IsIosSimulatorAvailable(options.chrome_root)):
- return []
-
- return [IOSDevice()]

Powered by Google App Engine
This is Rietveld 408576698