summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xacts/framework/setup.py3
-rwxr-xr-xacts_tests/acts_contrib/test_utils/wifi/p2p/wifi_p2p_test_utils.py1
-rw-r--r--acts_tests/tests/google/wifi/WifiBridgedApTest.py20
-rw-r--r--acts_tests/tests/google/wifi/aware/functional/DiscoveryTest.py25
-rw-r--r--acts_tests/tests/google/wifi/rtt/functional/RangeAwareTest.py26
5 files changed, 47 insertions, 28 deletions
diff --git a/acts/framework/setup.py b/acts/framework/setup.py
index 01ac079f0..30b193321 100755
--- a/acts/framework/setup.py
+++ b/acts/framework/setup.py
@@ -26,7 +26,6 @@ install_requires = [
# Require an older version of setuptools that does not enforce PEP 440.
# This must be added first.
'setuptools<66.0.0',
- 'backoff',
# Future needs to have a newer version that contains urllib.
'future>=0.16.0',
'mobly==1.12.0',
@@ -46,6 +45,7 @@ install_requires = [
]
versioned_deps = {
+ 'backoff': 'backoff',
'numpy': 'numpy',
'scipy': 'scipy',
'protobuf': 'protobuf==4.21.5',
@@ -58,6 +58,7 @@ if sys.version_info < (3, 8):
versioned_deps['numpy'] = 'numpy<1.22'
versioned_deps['scipy'] = 'scipy<1.8'
if sys.version_info < (3, 7):
+ versioned_deps['backoff'] = 'backoff<2.0'
versioned_deps['numpy'] = 'numpy<1.20'
versioned_deps['scipy'] = 'scipy<1.6'
versioned_deps['protobuf'] = 'protobuf==3.20.1'
diff --git a/acts_tests/acts_contrib/test_utils/wifi/p2p/wifi_p2p_test_utils.py b/acts_tests/acts_contrib/test_utils/wifi/p2p/wifi_p2p_test_utils.py
index b5832d05f..10f3ea0ad 100755
--- a/acts_tests/acts_contrib/test_utils/wifi/p2p/wifi_p2p_test_utils.py
+++ b/acts_tests/acts_contrib/test_utils/wifi/p2p/wifi_p2p_test_utils.py
@@ -339,7 +339,6 @@ def find_p2p_group_owner(ad1, ad2):
while not p2p_find_result:
ad2.droid.wifiP2pStopPeerDiscovery()
ad1.droid.wifiP2pStopPeerDiscovery()
- ad2.droid.wifiP2pDiscoverPeers()
ad1.droid.wifiP2pDiscoverPeers()
ad1_event = ad1.ed.pop_event(p2pconsts.PEER_AVAILABLE_EVENT,
p2pconsts.P2P_FIND_TIMEOUT)
diff --git a/acts_tests/tests/google/wifi/WifiBridgedApTest.py b/acts_tests/tests/google/wifi/WifiBridgedApTest.py
index b00ddae9a..93ae49656 100644
--- a/acts_tests/tests/google/wifi/WifiBridgedApTest.py
+++ b/acts_tests/tests/google/wifi/WifiBridgedApTest.py
@@ -78,6 +78,8 @@ class WifiBridgedApTest(WifiBaseTest):
def teardown_test(self):
super().teardown_test()
+ # Reset unplugged status
+ self.dut.adb.shell("cmd battery reset")
if self.dut.droid.wifiIsApEnabled():
wutils.stop_wifi_tethering(self.dut)
for ad in self.android_devices:
@@ -904,6 +906,8 @@ class WifiBridgedApTest(WifiBaseTest):
asserts.skip_if(not is_supported, "BridgedAp is not supported in {}"
.format(wutils.WifiEnums.CountryCode.US))
+ # Simulate the unplugged scenario
+ self.dut.adb.shell("cmd battery unplug")
# Enable BridgedAp and verify both 2G,5G instances have been enabled.
self.enable_bridged_ap(self.dut,
WifiEnums.SoftApSecurityType.WPA3_SAE,
@@ -954,6 +958,8 @@ class WifiBridgedApTest(WifiBaseTest):
asserts.skip_if(not is_supported, "BridgedAp is not supported in {}"
.format(wutils.WifiEnums.CountryCode.US))
+ # Simulate the unplugged scenario
+ self.dut.adb.shell("cmd battery unplug")
# Enable BridgedAp and verify both 2G,5G instances have been enabled.
self.enable_bridged_ap(self.dut,
WifiEnums.SoftApSecurityType.WPA3_SAE,
@@ -1028,6 +1034,8 @@ class WifiBridgedApTest(WifiBaseTest):
asserts.skip_if(not is_supported, "BridgedAp is not supported in {}"
.format(wutils.WifiEnums.CountryCode.US))
+ # Simulate the unplugged scenario
+ self.dut.adb.shell("cmd battery unplug")
# Enable BridgedAp and verify both 2G,5G instances have been enabled.
self.enable_bridged_ap(self.dut,
WifiEnums.SoftApSecurityType.WPA3_SAE,
@@ -1129,6 +1137,8 @@ class WifiBridgedApTest(WifiBaseTest):
asserts.skip_if(not is_supported, "BridgedAp is not supported in {}"
.format(wutils.WifiEnums.CountryCode.US))
+ # Simulate the unplugged scenario
+ self.dut.adb.shell("cmd battery unplug")
# Enable BridgedAp and verify both 2G,5G instances have been enabled.
self.enable_bridged_ap(self.dut,
WifiEnums.SoftApSecurityType.WPA3_SAE,
@@ -1173,6 +1183,8 @@ class WifiBridgedApTest(WifiBaseTest):
asserts.skip_if(not is_supported, "BridgedAp is not supported in {}"
.format(wutils.WifiEnums.CountryCode.US))
+ # Simulate the unplugged scenario
+ self.dut.adb.shell("cmd battery unplug")
# Enable BridgedAp and verify both 2G,5G instances have been enabled.
self.enable_bridged_ap(self.dut,
WifiEnums.SoftApSecurityType.WPA3_SAE,
@@ -1223,6 +1235,8 @@ class WifiBridgedApTest(WifiBaseTest):
asserts.skip_if(not is_supported, "BridgedAp is not supported in {}"
.format(wutils.WifiEnums.CountryCode.US))
+ # Simulate the unplugged scenario
+ self.dut.adb.shell("cmd battery unplug")
# Enable BridgedAp and verify both 2G,5G instances have been enabled.
self.enable_bridged_ap(self.dut,
WifiEnums.SoftApSecurityType.WPA3_SAE,
@@ -1272,6 +1286,9 @@ class WifiBridgedApTest(WifiBaseTest):
self.dut, wutils.WifiEnums.CountryCode.US)
asserts.skip_if(not is_supported, "BridgedAp is not supported in {}"
.format(wutils.WifiEnums.CountryCode.US))
+
+ # Simulate the unplugged scenario
+ self.dut.adb.shell("cmd battery unplug")
# Enable BridgedAp with "Extend compatibility set to ON".
self.enable_bridged_ap(self.dut,
WifiEnums.SoftApSecurityType.WPA3_SAE,
@@ -1314,6 +1331,9 @@ class WifiBridgedApTest(WifiBaseTest):
self.dut, wutils.WifiEnums.CountryCode.US)
asserts.skip_if(not is_supported, "BridgedAp is not supported in {}"
.format(wutils.WifiEnums.CountryCode.US))
+
+ # Simulate the unplugged scenario
+ self.dut.adb.shell("cmd battery unplug")
# Enable BridgedAp with "Extend compatibility set to ON".
self.enable_bridged_ap(self.dut,
WifiEnums.SoftApSecurityType.WPA3_SAE,
diff --git a/acts_tests/tests/google/wifi/aware/functional/DiscoveryTest.py b/acts_tests/tests/google/wifi/aware/functional/DiscoveryTest.py
index 39f009d53..69dc42c84 100644
--- a/acts_tests/tests/google/wifi/aware/functional/DiscoveryTest.py
+++ b/acts_tests/tests/google/wifi/aware/functional/DiscoveryTest.py
@@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import queue
import string
import time
@@ -32,6 +33,7 @@ class DiscoveryTest(AwareBaseTest):
PAYLOAD_SIZE_MIN = 0
PAYLOAD_SIZE_TYPICAL = 1
PAYLOAD_SIZE_MAX = 2
+ EVENT_TIMEOUT = 3
# message strings
query_msg = "How are you doing? 你好嗎?"
@@ -1111,6 +1113,18 @@ class DiscoveryTest(AwareBaseTest):
event["data"][aconsts.SESSION_CB_KEY_MESSAGE_AS_STRING], s_to_p_msg,
"Message on service %s from Subscriber to Publisher "
"not received correctly" % session_name["pub"][p_disc_id])
+ try:
+ event = p_dut.ed.pop_event(autils.decorate_event(aconsts.SESSION_CB_ON_MESSAGE_RECEIVED,
+ p_disc_id), self.EVENT_TIMEOUT)
+ p_dut.log.info("re-transmit message received: "
+ + event["data"][aconsts.SESSION_CB_KEY_MESSAGE_AS_STRING])
+ asserts.assert_equal(
+ event["data"][aconsts.SESSION_CB_KEY_MESSAGE_AS_STRING], s_to_p_msg,
+ "Message on service %s from Subscriber to Publisher "
+ "not received correctly" % session_name["pub"][p_disc_id])
+ except queue.Empty:
+ p_dut.log.info("no re-transmit message")
+
peer_id_on_pub = event["data"][aconsts.SESSION_CB_KEY_PEER_ID]
# Message send from Publisher to Subscriber
@@ -1129,6 +1143,17 @@ class DiscoveryTest(AwareBaseTest):
event["data"][aconsts.SESSION_CB_KEY_MESSAGE_AS_STRING], p_to_s_msg,
"Message on service %s from Publisher to Subscriber"
"not received correctly" % session_name["sub"][s_disc_id])
+ try:
+ event = s_dut.ed.pop_event(autils.decorate_event(aconsts.SESSION_CB_ON_MESSAGE_RECEIVED,
+ s_disc_id), self.EVENT_TIMEOUT)
+ s_dut.log.info("re-transmit message received: "
+ + event["data"][aconsts.SESSION_CB_KEY_MESSAGE_AS_STRING])
+ asserts.assert_equal(
+ event["data"][aconsts.SESSION_CB_KEY_MESSAGE_AS_STRING], p_to_s_msg,
+ "Message on service %s from Publisher to Subscriber"
+ "not received correctly" % session_name["sub"][s_disc_id])
+ except queue.Empty:
+ s_dut.log.info("no re-transmit message")
def run_multiple_concurrent_services_same_name_diff_ssi(self, type_x, type_y):
"""Validate same service name with multiple service specific info on publisher
diff --git a/acts_tests/tests/google/wifi/rtt/functional/RangeAwareTest.py b/acts_tests/tests/google/wifi/rtt/functional/RangeAwareTest.py
index 1051fc4db..84ad88e2b 100644
--- a/acts_tests/tests/google/wifi/rtt/functional/RangeAwareTest.py
+++ b/acts_tests/tests/google/wifi/rtt/functional/RangeAwareTest.py
@@ -339,19 +339,6 @@ class RangeAwareTest(AwareBaseTest, RttBaseTest):
#############################################################################
- @test_tracker_info(uuid="9e4e7ab4-2254-498c-9788-21e15ed9a370")
- def test_rtt_oob_discovery_one_way(self):
- """Perform RTT between 2 Wi-Fi Aware devices. Use out-of-band discovery
- to communicate the MAC addresses to the peer. Test one-direction RTT only.
- Functionality test: Only evaluate success rate.
- """
- rtt_results = self.run_rtt_oob_discovery_set(
- do_both_directions=False,
- iter_count=self.NUM_ITER,
- time_between_iterations=self.TIME_BETWEEN_ITERATIONS,
- time_between_roles=self.TIME_BETWEEN_ROLES)
- self.verify_results(rtt_results)
-
@test_tracker_info(uuid="22edba77-eeb2-43ee-875a-84437550ad84")
def test_rtt_oob_discovery_both_ways(self):
"""Perform RTT between 2 Wi-Fi Aware devices. Use out-of-band discovery
@@ -393,19 +380,6 @@ class RangeAwareTest(AwareBaseTest, RttBaseTest):
time_between_roles=self.TIME_BETWEEN_ROLES)
self.verify_results(rtt_results1, rtt_results2)
- @test_tracker_info(uuid="3a1d19a2-7241-49e0-aaf2-0a1da4c29783")
- def test_rtt_oob_discovery_one_way_with_accuracy_evaluation(self):
- """Perform RTT between 2 Wi-Fi Aware devices. Use out-of-band discovery
- to communicate the MAC addresses to the peer. Test one-direction RTT only.
- Performance test: evaluate success rate and accuracy.
- """
- rtt_results = self.run_rtt_oob_discovery_set(
- do_both_directions=False,
- iter_count=self.NUM_ITER,
- time_between_iterations=self.TIME_BETWEEN_ITERATIONS,
- time_between_roles=self.TIME_BETWEEN_ROLES)
- self.verify_results(rtt_results, accuracy_evaluation=True)
-
@test_tracker_info(uuid="82f954a5-c0ec-4bc6-8940-3b72199328ac")
def test_rtt_oob_discovery_both_ways_with_accuracy_evaluation(self):
"""Perform RTT between 2 Wi-Fi Aware devices. Use out-of-band discovery