Merge "Fix NAN-related VTS tests."
diff --git a/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp b/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp
index 0806ed2..fec9122 100644
--- a/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp
+++ b/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp
@@ -583,6 +583,9 @@
* CreateNanIface
*/
TEST_P(WifiChipAidlTest, CreateNanIface) {
+ if (!::testing::deviceSupportsFeature("android.hardware.wifi.aware")) {
+ GTEST_SKIP() << "Skipping this test since NAN is not supported.";
+ }
configureChipForNanAndGetIface();
}
@@ -590,7 +593,7 @@
* CreateP2pIface
*/
TEST_P(WifiChipAidlTest, CreateP2pIface) {
- configureChipForNanAndGetIface();
+ configureChipForP2pAndGetIface();
}
/*
@@ -672,6 +675,9 @@
* GetNanIfaceNames
*/
TEST_P(WifiChipAidlTest, GetNanIfaceNames) {
+ if (!::testing::deviceSupportsFeature("android.hardware.wifi.aware")) {
+ GTEST_SKIP() << "Skipping this test since NAN is not supported.";
+ }
configureChipForConcurrencyType(IfaceConcurrencyType::NAN_IFACE);
std::vector<std::string> iface_names;
@@ -753,6 +759,9 @@
* GetNanIface
*/
TEST_P(WifiChipAidlTest, GetNanIface) {
+ if (!::testing::deviceSupportsFeature("android.hardware.wifi.aware")) {
+ GTEST_SKIP() << "Skipping this test since NAN is not supported.";
+ }
std::shared_ptr<IWifiNanIface> iface = configureChipForNanAndGetIface();
std::string iface_name = getNanIfaceName(iface);
@@ -822,6 +831,9 @@
* RemoveNanIface
*/
TEST_P(WifiChipAidlTest, RemoveNanIface) {
+ if (!::testing::deviceSupportsFeature("android.hardware.wifi.aware")) {
+ GTEST_SKIP() << "Skipping this test since NAN is not supported.";
+ }
std::shared_ptr<IWifiNanIface> iface = configureChipForNanAndGetIface();
std::string iface_name = getNanIfaceName(iface);