Merge RP1A.200501.001

Change-Id: Iccb6fc3cd9adacd0d6beafff7e0c4d70634b21c0
diff --git a/acts/framework/acts/test_utils/wifi/aware/AwareBaseTest.py b/acts/framework/acts/test_utils/wifi/aware/AwareBaseTest.py
index d7f6ba8..ed85f5b 100644
--- a/acts/framework/acts/test_utils/wifi/aware/AwareBaseTest.py
+++ b/acts/framework/acts/test_utils/wifi/aware/AwareBaseTest.py
@@ -32,7 +32,8 @@
     device_startup_offset = 2
 
     def setup_test(self):
-        required_params = ("aware_default_power_mode", )
+        required_params = ("aware_default_power_mode",
+                           "dbs_supported_models",)
         self.unpack_userparams(required_params)
 
         for ad in self.android_devices:
diff --git a/acts/tests/google/wifi/WifiCrashTest.py b/acts/tests/google/wifi/WifiCrashTest.py
index d43a0b9..e6cbe2e 100644
--- a/acts/tests/google/wifi/WifiCrashTest.py
+++ b/acts/tests/google/wifi/WifiCrashTest.py
@@ -29,9 +29,8 @@
 from acts.test_utils.wifi.WifiBaseTest import WifiBaseTest
 
 WifiEnums = wutils.WifiEnums
-# Default timeout used for reboot, toggle WiFi and Airplane mode,
-# for the system to settle down after the operation.
-DEFAULT_TIMEOUT = 10
+# Timeout used for crash recovery.
+RECOVERY_TIMEOUT = 15
 WIFICOND_KILL_SHELL_COMMAND = "killall wificond"
 WIFI_VENDOR_HAL_KILL_SHELL_COMMAND = "killall android.hardware.wifi@1.0-service vendor.google.wifi_ext@1.0-service-vendor"
 SUPPLICANT_KILL_SHELL_COMMAND = "killall wpa_supplicant"
@@ -100,7 +99,7 @@
         self.dut.restart_runtime()
         # We won't get the disconnect broadcast because framework crashed.
         # wutils.wait_for_disconnect(self.dut)
-        time.sleep(DEFAULT_TIMEOUT)
+        time.sleep(RECOVERY_TIMEOUT)
         wifi_info = self.dut.droid.wifiGetConnectionInfo()
         if wifi_info[WifiEnums.SSID_KEY] != self.network[WifiEnums.SSID_KEY]:
             raise signals.TestFailure("Device did not connect to the"
@@ -123,7 +122,7 @@
         self.log.info("Crashing wificond")
         self.dut.adb.shell(WIFICOND_KILL_SHELL_COMMAND)
         wutils.wait_for_disconnect(self.dut)
-        time.sleep(DEFAULT_TIMEOUT)
+        time.sleep(RECOVERY_TIMEOUT)
         wifi_info = self.dut.droid.wifiGetConnectionInfo()
         if wifi_info[WifiEnums.SSID_KEY] != self.network[WifiEnums.SSID_KEY]:
             raise signals.TestFailure("Device did not connect to the"
@@ -146,7 +145,7 @@
         self.log.info("Crashing wifi HAL")
         self.dut.adb.shell(WIFI_VENDOR_HAL_KILL_SHELL_COMMAND)
         wutils.wait_for_disconnect(self.dut)
-        time.sleep(DEFAULT_TIMEOUT)
+        time.sleep(RECOVERY_TIMEOUT)
         wifi_info = self.dut.droid.wifiGetConnectionInfo()
         if wifi_info[WifiEnums.SSID_KEY] != self.network[WifiEnums.SSID_KEY]:
             raise signals.TestFailure("Device did not connect to the"
@@ -169,7 +168,7 @@
         self.log.info("Crashing wpa_supplicant")
         self.dut.adb.shell(SUPPLICANT_KILL_SHELL_COMMAND)
         wutils.wait_for_disconnect(self.dut)
-        time.sleep(DEFAULT_TIMEOUT)
+        time.sleep(RECOVERY_TIMEOUT)
         wifi_info = self.dut.droid.wifiGetConnectionInfo()
         if wifi_info[WifiEnums.SSID_KEY] != self.network[WifiEnums.SSID_KEY]:
             raise signals.TestFailure("Device did not connect to the"
diff --git a/acts/tests/google/wifi/aware/functional/DiscoveryTest.py b/acts/tests/google/wifi/aware/functional/DiscoveryTest.py
index d867443..d3bef9b 100644
--- a/acts/tests/google/wifi/aware/functional/DiscoveryTest.py
+++ b/acts/tests/google/wifi/aware/functional/DiscoveryTest.py
@@ -22,6 +22,7 @@
 from acts.test_utils.wifi.aware import aware_const as aconsts
 from acts.test_utils.wifi.aware import aware_test_utils as autils
 from acts.test_utils.wifi.aware.AwareBaseTest import AwareBaseTest
+from acts.test_utils.wifi.WifiBaseTest import WifiBaseTest
 
 
 class DiscoveryTest(AwareBaseTest):
@@ -561,6 +562,7 @@
     #######################################
 
     @test_tracker_info(uuid="954ebbde-ed2b-4f04-9e68-88239187d69d")
+    @WifiBaseTest.wifi_test_wrap
     def test_positive_unsolicited_passive_typical(self):
         """Functional test case / Discovery test cases / positive test case:
     - Solicited publish + passive subscribe
diff --git a/acts/tests/google/wifi/aware/functional/NonConcurrencyTest.py b/acts/tests/google/wifi/aware/functional/NonConcurrencyTest.py
index 70c9cc5..7622889 100644
--- a/acts/tests/google/wifi/aware/functional/NonConcurrencyTest.py
+++ b/acts/tests/google/wifi/aware/functional/NonConcurrencyTest.py
@@ -17,6 +17,7 @@
 from acts import asserts
 import queue
 from acts import utils
+from acts.test_decorators import test_tracker_info
 from acts.test_utils.wifi import wifi_test_utils as wutils
 from acts.test_utils.wifi import wifi_constants as wconsts
 from acts.test_utils.wifi.aware import aware_const as aconsts
@@ -194,23 +195,30 @@
 
     ##########################################################################
 
+    @test_tracker_info(uuid="b7c84cbe-d744-440a-9279-a0133e88e8cb")
     def test_run_p2p_then_aware(self):
         """Validate that if p2p is already up then any Aware operation fails"""
         self.run_incompat_service_then_aware(is_p2p=True)
 
+    @test_tracker_info(uuid="1e7b3a6d-575d-4911-80bb-6fcf1157ee9f")
     def test_run_aware_then_p2p(self):
         """Validate that a running Aware session terminates when p2p is started"""
         self.run_aware_then_incompat_service(is_p2p=True)
 
+    @test_tracker_info(uuid="82a0bd98-3022-4831-ac9e-d81f58c742d2")
     def test_run_softap_then_aware(self):
         """Validate that if SoftAp is already up then any Aware operation fails"""
+        asserts.skip_if(self.dut.model not in self.dbs_supported_models,
+                        "Device %s doesn't support STA+AP." % self.dut.model)
         self.run_incompat_service_then_aware(is_p2p=False)
 
+    @test_tracker_info(uuid="0da7661e-8ac2-4f68-b6d3-b3f612369d03")
     def test_run_aware_then_softap(self):
         """Validate that a running Aware session terminates when softAp is
     started"""
         self.run_aware_then_incompat_service(is_p2p=False)
 
+    @test_tracker_info(uuid="2ac27ac6-8010-4d05-b892-00242420b075")
     def test_run_aware_then_connect_new_ap(self):
         """Validate connect new ap during Aware session"""
         self.run_aware_then_connect_to_new_ap()