Index: tools/telemetry/telemetry/internal/platform/android_device_unittest.py |
diff --git a/tools/telemetry/telemetry/internal/platform/android_device_unittest.py b/tools/telemetry/telemetry/internal/platform/android_device_unittest.py |
index f953b30b7e78ebb0a9b2de3733180f653e47007e..c885c163bf05d467ed603c00d9cf87d4c251a95b 100644 |
--- a/tools/telemetry/telemetry/internal/platform/android_device_unittest.py |
+++ b/tools/telemetry/telemetry/internal/platform/android_device_unittest.py |
@@ -4,6 +4,7 @@ |
import unittest |
+from telemetry import decorators |
from telemetry.internal.browser import browser_options |
from telemetry.internal.platform import android_device |
from telemetry.testing import system_stub |
@@ -31,6 +32,7 @@ class _BaseAndroidDeviceTest(unittest.TestCase): |
class AndroidDeviceTest(_BaseAndroidDeviceTest): |
+ @decorators.Enabled('android') |
def testGetAllAttachedAndroidDevices(self): |
self._healthy_device_mock.return_value = [ |
self._GetMockDeviceUtils('01'), |
@@ -42,6 +44,7 @@ class AndroidDeviceTest(_BaseAndroidDeviceTest): |
set(device.device_id for device in |
android_device.AndroidDevice.GetAllConnectedDevices(None))) |
+ @decorators.Enabled('android') |
def testNoAdbReturnsNone(self): |
finder_options = browser_options.BrowserFinderOptions() |
with ( |
@@ -50,6 +53,7 @@ class AndroidDeviceTest(_BaseAndroidDeviceTest): |
self.assertEquals([], self._android_device_stub.logging.warnings) |
self.assertIsNone(android_device.GetDevice(finder_options)) |
+ @decorators.Enabled('android') |
def testAdbNoDevicesReturnsNone(self): |
finder_options = browser_options.BrowserFinderOptions() |
with mock.patch('os.path.isabs', return_value=False): |
@@ -57,6 +61,7 @@ class AndroidDeviceTest(_BaseAndroidDeviceTest): |
self.assertEquals([], self._android_device_stub.logging.warnings) |
self.assertIsNone(android_device.GetDevice(finder_options)) |
+ @decorators.Enabled('android') |
def testAdbTwoDevicesReturnsNone(self): |
finder_options = browser_options.BrowserFinderOptions() |
with mock.patch('os.path.isabs', return_value=False): |
@@ -71,6 +76,7 @@ class AndroidDeviceTest(_BaseAndroidDeviceTest): |
self._android_device_stub.logging.warnings) |
self.assertIsNone(device) |
+ @decorators.Enabled('android') |
def testAdbPickOneDeviceReturnsDeviceInstance(self): |
finder_options = browser_options.BrowserFinderOptions() |
finder_options.device = '555d14fecddddddd' # pick one |
@@ -82,6 +88,7 @@ class AndroidDeviceTest(_BaseAndroidDeviceTest): |
self.assertEquals([], self._android_device_stub.logging.warnings) |
self.assertEquals('555d14fecddddddd', device.device_id) |
+ @decorators.Enabled('android') |
def testAdbOneDeviceReturnsDeviceInstance(self): |
finder_options = browser_options.BrowserFinderOptions() |
with mock.patch('os.path.isabs', return_value=False): |
@@ -93,6 +100,7 @@ class AndroidDeviceTest(_BaseAndroidDeviceTest): |
class FindAllAvailableDevicesTest(_BaseAndroidDeviceTest): |
+ @decorators.Enabled('android') |
def testAdbNoDeviceReturnsEmptyList(self): |
finder_options = browser_options.BrowserFinderOptions() |
with mock.patch('os.path.isabs', return_value=False): |
@@ -102,6 +110,7 @@ class FindAllAvailableDevicesTest(_BaseAndroidDeviceTest): |
self.assertIsNotNone(devices) |
self.assertEquals(len(devices), 0) |
+ @decorators.Enabled('android') |
def testAdbOneDeviceReturnsListWithOneDeviceInstance(self): |
finder_options = browser_options.BrowserFinderOptions() |
with mock.patch('os.path.isabs', return_value=False): |
@@ -113,6 +122,7 @@ class FindAllAvailableDevicesTest(_BaseAndroidDeviceTest): |
self.assertEquals(len(devices), 1) |
self.assertEquals('015d14fec128220c', devices[0].device_id) |
+ @decorators.Enabled('android') |
def testAdbMultipleDevicesReturnsListWithAllDeviceInstances(self): |
finder_options = browser_options.BrowserFinderOptions() |
with mock.patch('os.path.isabs', return_value=False): |