Merge "Add TestTracker UUIDs to RfcommStressTest"
diff --git a/acts/framework/acts/controllers/anritsu_lib/md8475a.py b/acts/framework/acts/controllers/anritsu_lib/md8475a.py
index 28583ae..d00d0d9 100644
--- a/acts/framework/acts/controllers/anritsu_lib/md8475a.py
+++ b/acts/framework/acts/controllers/anritsu_lib/md8475a.py
@@ -513,11 +513,6 @@
error = int(err.decode('utf-8'))
if error != NO_ERROR:
raise AnritsuError(error, command)
- else:
- # check operation status
- status = self.send_query("*OPC?")
- if int(status) != OPERATION_COMPLETE:
- raise AnritsuError("Operation not completed")
except socket.timeout:
raise AnritsuError("Timeout for Command Response from Anritsu")
except socket.error:
@@ -570,8 +565,9 @@
# The state of the Smart Studio should be NOTRUN at this point
# after the one of the steps from above
if stat != "NOTRUN":
- self.log.info("Can not launch Smart Studio, "
- "please shut down all the Smart Studio SW components")
+ self.log.info(
+ "Can not launch Smart Studio, "
+ "please shut down all the Smart Studio SW components")
raise AnritsuError("Could not run SmartStudio")
def close_smartstudio(self):
@@ -612,21 +608,15 @@
sleep_interval = 2
waiting_time = 0
- self.send_command("START", 120)
-
- #FIXME. Doing this since Anritsu has some issue with CALLSTAT? in CDMA1X
- if BtsTechnology.CDMA1X.value in self.get_simulation_model():
- time.sleep(15)
- self.log.info("CDMA1X: Not waiting for POWEROFF state, returning")
- return
+ self.send_command("START", SMARTSTUDIO_SIMULATION_START_WAIT_TIME)
self.log.info("Waiting for CALLSTAT=POWEROFF")
- callstat = self.send_query("CALLSTAT?").split(",")
+ callstat = self.send_query("CALLSTAT? BTS1").split(",")
while callstat[0] != "POWEROFF":
time.sleep(sleep_interval)
- waiting_time = waiting_time + sleep_interval
+ waiting_time += sleep_interval
if waiting_time <= time_to_wait:
- callstat = self.send_query("CALLSTAT?").split(",")
+ callstat = self.send_query("CALLSTAT? BTS1").split(",")
else:
raise AnritsuError("Timeout: Starting simulation")
@@ -804,20 +794,13 @@
sleep_interval = 1
waiting_time = 0
- #FIXME. Doing this since Anritsu has some issue with CALLSTAT? in CDMA1X
- if BtsTechnology.CDMA1X.value in self.get_simulation_model():
- time.sleep(15)
- self.log.info("CDMA1X: Not waiting for IDLE/COMMUNICATION state,"
- " returning")
- return
-
self.log.info("Waiting for CALLSTAT=COMMUNICATION/IDLE")
- callstat = self.send_query("CALLSTAT?").split(",")
+ callstat = self.send_query("CALLSTAT? BTS1").split(",")
while callstat[0] != "IDLE" and callstat[1] != "COMMUNICATION":
time.sleep(sleep_interval)
- waiting_time = waiting_time + sleep_interval
+ waiting_time += sleep_interval
if waiting_time <= time_to_wait:
- callstat = self.send_query("CALLSTAT?").split(",")
+ callstat = self.send_query("CALLSTAT? BTS1").split(",")
else:
raise AnritsuError("UE failed to register on network")
@@ -835,20 +818,13 @@
sleep_interval = 1
waiting_time = 0
- #FIXME. Doing this since Anritsu has some issue with CALLSTAT? in CDMA1X
- if BtsTechnology.CDMA1X.value in self.get_simulation_model():
- time.sleep(15)
- self.log.info("CDMA1X: Not waiting for COMMUNICATION state,"
- " returning")
- return
-
self.log.info("Waiting for CALLSTAT=COMMUNICATION")
- callstat = self.send_query("CALLSTAT?").split(",")
+ callstat = self.send_query("CALLSTAT? BTS1").split(",")
while callstat[1] != "COMMUNICATION":
time.sleep(sleep_interval)
- waiting_time = waiting_time + sleep_interval
+ waiting_time += sleep_interval
if waiting_time <= time_to_wait:
- callstat = self.send_query("CALLSTAT?").split(",")
+ callstat = self.send_query("CALLSTAT? BTS1").split(",")
else:
raise AnritsuError("UE failed to register on network")
@@ -1127,7 +1103,8 @@
None
"""
if not isinstance(enable, ReturnToEUTRAN):
- raise ValueError('The parameter should be of type "ReturnToEUTRAN"')
+ raise ValueError(
+ 'The parameter should be of type "ReturnToEUTRAN"')
cmd = "SIMMODELEX RETEUTRAN," + enable.value
self.send_command(cmd)
@@ -1246,7 +1223,8 @@
None
"""
if not isinstance(procedure, TestProcedure):
- raise ValueError('The parameter should be of type "TestProcedure" ')
+ raise ValueError(
+ 'The parameter should be of type "TestProcedure" ')
cmd = "TESTPROCEDURE " + procedure.value
self._anritsu.send_command(cmd)
@@ -1602,7 +1580,8 @@
None
"""
if not isinstance(bandwidth, BtsBandwidth):
- raise ValueError(' The parameter should be of type "BtsBandwidth" ')
+ raise ValueError(
+ ' The parameter should be of type "BtsBandwidth" ')
cmd = "ULBANDWIDTH {},{}".format(bandwidth.value, self._bts_number)
self._anritsu.send_command(cmd)
@@ -1719,7 +1698,8 @@
if not isinstance(service_state, BtsServiceState):
raise ValueError(' The parameter should be of type'
' "BtsServiceState" ')
- cmd = "OUTOFSERVICE {},{}".format(service_state.value, self._bts_number)
+ cmd = "OUTOFSERVICE {},{}".format(service_state.value,
+ self._bts_number)
self._anritsu.send_command(cmd)
@property
@@ -2989,7 +2969,7 @@
None
"""
cmd = ("C2KSENDSMS System=CDMA\&Originating_Address={}\&UserData={}"
- ).format(phoneNumber, AnritsuUtils.cdma_encode(message))
+ ).format(phoneNumber, AnritsuUtils.cdma_encode(message))
return self._anritsu.send_command(cmd)
def receiveSms(self):
@@ -3059,7 +3039,8 @@
None
"""
if not isinstance(ip_type, IPAddressType):
- raise ValueError(' The parameter should be of type "IPAddressType"')
+ raise ValueError(
+ ' The parameter should be of type "IPAddressType"')
cmd = "PDNIPTYPE {},{}".format(self._pdn_number, ip_type.value)
self._anritsu.send_command(cmd)
diff --git a/acts/tests/google/ble/gatt/GattConnectTest.py b/acts/tests/google/ble/gatt/GattConnectTest.py
index 1a82759..d63b4d0 100644
--- a/acts/tests/google/ble/gatt/GattConnectTest.py
+++ b/acts/tests/google/ble/gatt/GattConnectTest.py
@@ -21,6 +21,7 @@
from queue import Empty
import time
+from acts.test_decorators import test_tracker_info
from acts.test_utils.bt.BluetoothBaseTest import BluetoothBaseTest
from acts.test_utils.bt.BtEnum import BluetoothProfile
from acts.test_utils.bt.GattEnum import GattCharacteristic
@@ -128,6 +129,7 @@
return True
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='8a3530a3-c8bb-466b-9710-99e694c38618')
def test_gatt_connect(self):
"""Test GATT connection over LE.
@@ -169,6 +171,7 @@
gatt_callback)
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='a839b505-03ac-4783-be7e-1d43129a1948')
def test_gatt_connect_stop_advertising(self):
"""Test GATT connection over LE then stop advertising
@@ -225,6 +228,7 @@
return True
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='b82f91a8-54bb-4779-a117-73dc7fdb28cc')
def test_gatt_connect_autoconnect(self):
"""Test GATT connection over LE.
@@ -291,6 +295,7 @@
return True
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='1e01838e-c4de-4720-9adf-9e0419378226')
def test_gatt_request_min_mtu(self):
"""Test GATT connection over LE and exercise MTU sizes.
@@ -340,6 +345,7 @@
gatt_callback)
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='c1fa3a2d-fb47-47db-bdd1-458928cd6a5f')
def test_gatt_request_max_mtu(self):
"""Test GATT connection over LE and exercise MTU sizes.
@@ -389,6 +395,7 @@
gatt_callback)
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='4416d483-dec3-46cb-8038-4d82620f873a')
def test_gatt_request_out_of_bounds_mtu(self):
"""Test GATT connection over LE and exercise an out of bound MTU size.
@@ -439,6 +446,7 @@
gatt_callback)
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='31ffb9ca-cc75-43fb-9802-c19f1c5856b6')
def test_gatt_connect_trigger_on_read_rssi(self):
"""Test GATT connection over LE read RSSI.
@@ -489,6 +497,7 @@
gatt_callback)
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='dee9ef28-b872-428a-821b-cc62f27ba936')
def test_gatt_connect_trigger_on_services_discovered(self):
"""Test GATT connection and discover services of peripheral.
@@ -541,6 +550,7 @@
gatt_callback)
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='01883bdd-0cf8-48fb-bf15-467bbd4f065b')
def test_gatt_connect_trigger_on_services_discovered_iterate_attributes(
self):
"""Test GATT connection and iterate peripherals attributes.
@@ -601,6 +611,7 @@
gatt_callback)
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='d4277bee-da99-4f48-8a4d-f81b5389da18')
def test_gatt_connect_with_service_uuid_variations(self):
"""Test GATT connection with multiple service uuids.
@@ -659,6 +670,7 @@
gatt_callback)
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='7d3442c5-f71f-44ae-bd35-f2569f01b3b8')
def test_gatt_connect_in_quick_succession(self):
"""Test GATT connections multiple times.
@@ -710,6 +722,7 @@
return True
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='148469d9-7ab0-4c08-b2e9-7e49e88da1fc')
def test_gatt_connect_mitm_attack(self):
"""Test GATT connection with permission write encrypted mitm.
@@ -816,6 +829,7 @@
gatt_callback)
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='cc3fc361-7bf1-4ee2-9e46-4a27c88ce6a8')
def test_gatt_connect_get_connected_devices(self):
"""Test GATT connections show up in getConnectedDevices
diff --git a/acts/tests/google/ble/gatt/GattNotifyTest.py b/acts/tests/google/ble/gatt/GattNotifyTest.py
index 58b0180..cf7d069 100644
--- a/acts/tests/google/ble/gatt/GattNotifyTest.py
+++ b/acts/tests/google/ble/gatt/GattNotifyTest.py
@@ -17,6 +17,7 @@
This test script exercises GATT notify/indicate procedures.
"""
+from acts.test_decorators import test_tracker_info
from acts.test_utils.bt.BluetoothBaseTest import BluetoothBaseTest
from acts.test_utils.bt.GattConnectedBaseTest import GattConnectedBaseTest
from acts.test_utils.bt.GattEnum import GattCharacteristic
@@ -29,6 +30,7 @@
class GattNotifyTest(GattConnectedBaseTest):
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='e0ba60af-c1f2-4516-a5d5-89e2def0c757')
def test_notify_char(self):
"""Test notify characteristic value.
@@ -79,14 +81,13 @@
event = self._client_wait(GattEvent.DESC_WRITE)
#set notified value
- notified_value = [1,5,9,7,5,3,6,4,8,2]
+ notified_value = [1, 5, 9, 7, 5, 3, 6, 4, 8, 2]
self.per_ad.droid.gattServerCharacteristicSetValue(
self.notifiable_char_index, notified_value)
#send notification
self.per_ad.droid.gattServerNotifyCharacteristicChanged(
- self.gatt_server, bt_device_id,
- self.notifiable_char_index, False)
+ self.gatt_server, bt_device_id, self.notifiable_char_index, False)
#wait for client to receive the notification
event = self._client_wait(GattEvent.CHAR_CHANGE)
diff --git a/acts/tests/google/bt/BtAirplaneModeTest.py b/acts/tests/google/bt/BtAirplaneModeTest.py
index c7b051e..90334fe 100644
--- a/acts/tests/google/bt/BtAirplaneModeTest.py
+++ b/acts/tests/google/bt/BtAirplaneModeTest.py
@@ -17,6 +17,8 @@
Test script to test various airplane mode scenarios and how it
affects Bluetooth state.
"""
+
+from acts.test_decorators import test_tracker_info
from acts.test_utils.bt.BluetoothBaseTest import BluetoothBaseTest
from acts.test_utils.bt.bt_test_utils import bluetooth_enabled_check
from acts.test_utils.tel.tel_test_utils import toggle_airplane_mode
@@ -42,6 +44,7 @@
return True
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='11209b74-f27f-44cc-b336-8cf7f168f653')
def test_bt_on_toggle_airplane_mode_on(self):
"""Test that toggles airplane mode on while BT on
@@ -72,6 +75,7 @@
return not self.dut.droid.bluetoothCheckState()
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='823bb1e1-ce39-43a9-9f2c-0bd2a9b8793f')
def test_bt_on_toggle_airplane_mode_on_bt_remains_off(self):
"""Test that verifies BT remains off after airplane mode toggles
@@ -102,13 +106,13 @@
self.log.error("Failed to toggle airplane mode on")
return False
toggle_timeout = 60
- self.log.info(
- "Waiting {} seconds until verifying Bluetooth state.".format(
- toggle_timeout))
+ self.log.info("Waiting {} seconds until verifying Bluetooth state.".
+ format(toggle_timeout))
time.sleep(toggle_timeout)
return not self.dut.droid.bluetoothCheckState()
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='d3977a15-c4b8-4dad-b4e4-98e7c3216688')
def test_bt_on_toggle_airplane_mode_on_then_off(self):
"""Test that toggles airplane mode both on and off
diff --git a/acts/tests/google/bt/BtBasicFunctionalityTest.py b/acts/tests/google/bt/BtBasicFunctionalityTest.py
index 5f30e4e..ab41358 100644
--- a/acts/tests/google/bt/BtBasicFunctionalityTest.py
+++ b/acts/tests/google/bt/BtBasicFunctionalityTest.py
@@ -21,6 +21,7 @@
import time
from queue import Empty
+from acts.test_decorators import test_tracker_info
from acts.test_utils.bt.BluetoothBaseTest import BluetoothBaseTest
from acts.test_utils.bt.BtEnum import BluetoothScanModeType
from acts.test_utils.bt.bt_test_utils import check_device_supported_profiles
@@ -58,8 +59,8 @@
take_btsnoop_logs(self.android_devices, self, test_name, begin_time)
reset_bluetooth(self.android_devices)
- #@BluetoothTest(UUID=290eb41f-6e66-4dc1-8f3e-55783901d116)
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='5a5dcf94-8114-405c-a048-b80d73e80ecc')
def test_bluetooth_reset(self):
"""Test resetting bluetooth.
@@ -81,8 +82,8 @@
"""
return reset_bluetooth([self.droid_ad])
- #@BluetoothTest(UUID=f9a5a5bb-12c4-435d-80a3-5172fd22266a)
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='fc205cb8-6878-4f97-b9c8-7ed532742a1b')
def test_make_device_discoverable(self):
"""Test device discoverablity.
@@ -146,8 +147,8 @@
return False
return True
- #@BluetoothTest(UUID=e9c95b6d-b1b4-4f88-a43b-24bbbd6a2119)
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='c4d77bde-04ed-4805-9185-9bc46dc8af4b')
def test_make_device_undiscoverable(self):
"""Test device un-discoverability.
@@ -172,8 +173,7 @@
Priority: 1
"""
self.droid_ad.droid.bluetoothMakeUndiscoverable()
- set_bt_scan_mode(self.droid1_ad,
- BluetoothScanModeType.SCAN_MODE_NONE)
+ set_bt_scan_mode(self.droid1_ad, BluetoothScanModeType.SCAN_MODE_NONE)
scan_mode = self.droid1_ad.droid.bluetoothGetScanMode()
if scan_mode == BluetoothScanModeType.SCAN_MODE_NONE:
self.log.debug("Android device1 scan mode is SCAN_MODE_NONE")
@@ -209,8 +209,8 @@
return False
return True
- #@BluetoothTest(UUID=5e2813a8-3386-461b-b327-2858101c40c0)
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='2bcb6288-64c3-437e-bc89-bcd416310135')
def test_set_device_name(self):
"""Test bluetooth device name.
@@ -234,7 +234,8 @@
name = "SetDeviceName"
return set_device_name(self.droid_ad.droid, name)
- #@BluetoothTest(UUID=e5cdd6b6-3c66-4405-8e3e-74b0fb3a2599)
+ @BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='b38fb110-a707-47cf-b1c3-981266373786')
def test_scan_mode_off(self):
"""Test disabling bluetooth scanning.
@@ -256,11 +257,11 @@
Priority: 1
"""
self.log.debug("Test scan mode STATE_OFF.")
- return set_bt_scan_mode(self.droid_ad,
- BluetoothScanModeType.STATE_OFF)
+ return set_bt_scan_mode(self.droid_ad, BluetoothScanModeType.STATE_OFF)
#@BluetoothTest(UUID=27576aa8-d52f-45ad-986a-f44fb565167d)
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='702c3d58-94fd-47ee-9323-2421ce182ddb')
def test_scan_mode_none(self):
"""Test bluetooth scan mode none.
@@ -285,8 +286,8 @@
return set_bt_scan_mode(self.droid_ad,
BluetoothScanModeType.SCAN_MODE_NONE)
- #@BluetoothTest(UUID=c607780f-1bb3-4325-9248-a5bf131d0b40)
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='cb998a99-31a6-46b6-9de6-a9a17081a604')
def test_scan_mode_connectable(self):
"""Test bluetooth scan mode connectable.
@@ -308,11 +309,11 @@
Priority: 2
"""
self.log.debug("Test scan mode SCAN_MODE_CONNECTABLE.")
- return set_bt_scan_mode(
- self.droid_ad, BluetoothScanModeType.SCAN_MODE_CONNECTABLE)
+ return set_bt_scan_mode(self.droid_ad,
+ BluetoothScanModeType.SCAN_MODE_CONNECTABLE)
- #@BluetoothTest(UUID=05fa38bc-9ed8-44aa-804f-6d7a7ef4d012)
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='59bec55c-c64e-43e4-9a9a-e44408a801d7')
def test_scan_mode_connectable_discoverable(self):
"""Test bluetooth scan mode connectable.
@@ -338,8 +339,8 @@
self.droid_ad,
BluetoothScanModeType.SCAN_MODE_CONNECTABLE_DISCOVERABLE)
- #@BluetoothTest(UUID=f1aa3320-fab7-4206-9142-19dc2f5b8a66)
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='cd20a09d-a68d-4f55-b016-ba283b0460df')
def test_if_support_hid_profile(self):
""" Test that a single device can support HID profile.
Steps
@@ -363,8 +364,8 @@
return False
return True
- #@BluetoothTest(UUID=300775bd-b93c-492f-81ef-dc1191ef88b2)
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='a110d330-7090-4784-a33b-33089dc5f67f')
def test_if_support_hsp_profile(self):
""" Test that a single device can support HSP profile.
Steps
@@ -379,8 +380,8 @@
return False
return True
- #@BluetoothTest(UUID=f2c8862b-2bdc-4d02-a0de-ab2355daafba)
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='9ccefdd9-62a9-4aed-b4d9-7b0a55c338b2')
def test_if_support_a2dp_profile(self):
""" Test that a single device can support A2DP profile.
Steps
diff --git a/acts/tests/google/bt/BtFactoryResetTest.py b/acts/tests/google/bt/BtFactoryResetTest.py
index 50ae8c3..c2968e3 100644
--- a/acts/tests/google/bt/BtFactoryResetTest.py
+++ b/acts/tests/google/bt/BtFactoryResetTest.py
@@ -16,6 +16,7 @@
"""
Test script to test BluetoothAdapter's resetFactory method.
"""
+from acts.test_decorators import test_tracker_info
from acts.test_utils.bt.BluetoothBaseTest import BluetoothBaseTest
from acts.test_utils.bt.bt_test_utils import pair_pri_to_sec
@@ -30,6 +31,7 @@
self.sec_dut = self.android_devices[1]
@BluetoothBaseTest.bt_test_wrap
+ @test_tracker_info(uuid='800bce6a-87ef-4fd1-82a5-4c60c4133be1')
def test_factory_reset_bluetooth(self):
"""Test that BluetoothAdapter.factoryReset removes bonded devices
@@ -52,8 +54,7 @@
TAGS: Bluetooth, Factory Reset
Priority: 2
"""
- if not pair_pri_to_sec(
- self.pri_dut, self.sec_dut, attemps=1):
+ if not pair_pri_to_sec(self.pri_dut, self.sec_dut, attemps=1):
self.log.error("Failed to bond devices.")
return False
if not self.pri_dut.droid.bluetoothFactoryReset():
diff --git a/acts/tests/google/bt/BtKillProcessTest.py b/acts/tests/google/bt/BtKillProcessTest.py
index 2096970..54b8fdb 100644
--- a/acts/tests/google/bt/BtKillProcessTest.py
+++ b/acts/tests/google/bt/BtKillProcessTest.py
@@ -19,6 +19,7 @@
"""
import time
+from acts.test_decorators import test_tracker_info
from acts.test_utils.bt.BluetoothBaseTest import BluetoothBaseTest
@@ -39,6 +40,8 @@
else:
return False
+ @BluetoothBaseTest.bt_test_wrap()
+ @test_tracker_info(uuid='c51186e9-4ba8-406c-b609-ea552868e4c9')
def test_kill_process(self):
"""Test that a killed Bluetooth process restarts
diff --git a/acts/tests/google/bt/system_tests/BtStressTest.py b/acts/tests/google/bt/system_tests/BtStressTest.py
index 2ef8dc0..e756c9c 100644
--- a/acts/tests/google/bt/system_tests/BtStressTest.py
+++ b/acts/tests/google/bt/system_tests/BtStressTest.py
@@ -19,6 +19,7 @@
import time
from acts.base_test import BaseTestClass
+from acts.test_decorators import test_tracker_info
from acts.test_utils.bt.BluetoothBaseTest import BluetoothBaseTest
from acts.test_utils.bt.bt_test_utils import clear_bonded_devices
from acts.test_utils.bt.bt_test_utils import pair_pri_to_sec
@@ -33,12 +34,12 @@
def __init__(self, controllers):
BluetoothBaseTest.__init__(self, controllers)
-
def teardown_test(self):
super(BluetoothBaseTest, self).teardown_test()
self.log_stats()
return True
+ @test_tracker_info(uuid='bbe050f8-7970-42b3-9104-a2cd8f09579c')
def test_toggle_bluetooth(self):
"""Stress test toggling bluetooth on and off.
@@ -67,6 +68,7 @@
return False
return True
+ @test_tracker_info(uuid='a6fac426-d068-4a86-9d55-00dbe51b2ff0')
def test_pair_bluetooth_stress(self):
"""Stress test for pairing BT devices.
@@ -95,9 +97,11 @@
for n in range(self.iterations):
self.log.info("Pair bluetooth iteration {}.".format(n + 1))
self.start_timer()
- if (not pair_pri_to_sec(self.android_devices[0],
- self.android_devices[1],
- attempts=1, auto_confirm=False)):
+ if (not pair_pri_to_sec(
+ self.android_devices[0],
+ self.android_devices[1],
+ attempts=1,
+ auto_confirm=False)):
self.log.error("Failed to bond devices.")
return False
self.log.info("Total time (ms): {}".format(self.end_timer()))