From e8e161e255c72dac6aa58ad4e7eac4e9b4190d12 Mon Sep 17 00:00:00 2001 From: Gabriel Biren Date: Mon, 11 Sep 2023 17:15:28 +0000 Subject: [PATCH] Skip AP and P2P tests in wifi_chip_aidl_test if those iface types cannot be created. Bug: 297959416 Test: atest VtsHalWifiChipTargetTest Change-Id: I917be24bb46b74fe3fb9d08e8af099b782e19469 --- .../vts/functional/wifi_chip_aidl_test.cpp | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp b/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp index bbd27f95e3..740f8332b7 100644 --- a/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp +++ b/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp @@ -63,6 +63,10 @@ class WifiChipAidlTest : public testing::TestWithParam { return mode_id; } + bool isConcurrencyTypeSupported(IfaceConcurrencyType type) { + return doesChipSupportConcurrencyType(wifi_chip_, type); + } + std::shared_ptr configureChipForStaAndGetIface() { std::shared_ptr iface; configureChipForConcurrencyType(IfaceConcurrencyType::STA); @@ -532,6 +536,9 @@ TEST_P(WifiChipAidlTest, CreateStaIface) { * CreateApIface */ TEST_P(WifiChipAidlTest, CreateApIface) { + if (!isConcurrencyTypeSupported(IfaceConcurrencyType::AP)) { + GTEST_SKIP() << "AP is not supported"; + } configureChipForApAndGetIface(); } @@ -549,6 +556,9 @@ TEST_P(WifiChipAidlTest, CreateNanIface) { * CreateP2pIface */ TEST_P(WifiChipAidlTest, CreateP2pIface) { + if (!isConcurrencyTypeSupported(IfaceConcurrencyType::P2P)) { + GTEST_SKIP() << "P2P is not supported"; + } configureChipForP2pAndGetIface(); } @@ -583,6 +593,9 @@ TEST_P(WifiChipAidlTest, GetStaIfaceNames) { * GetP2pIfaceNames */ TEST_P(WifiChipAidlTest, GetP2pIfaceNames) { + if (!isConcurrencyTypeSupported(IfaceConcurrencyType::P2P)) { + GTEST_SKIP() << "P2P is not supported"; + } configureChipForConcurrencyType(IfaceConcurrencyType::P2P); std::vector iface_names; @@ -607,6 +620,9 @@ TEST_P(WifiChipAidlTest, GetP2pIfaceNames) { * GetApIfaceNames */ TEST_P(WifiChipAidlTest, GetApIfaceNames) { + if (!isConcurrencyTypeSupported(IfaceConcurrencyType::AP)) { + GTEST_SKIP() << "AP is not supported"; + } configureChipForConcurrencyType(IfaceConcurrencyType::AP); std::vector iface_names; @@ -679,6 +695,9 @@ TEST_P(WifiChipAidlTest, GetStaIface) { * GetP2pIface */ TEST_P(WifiChipAidlTest, GetP2pIface) { + if (!isConcurrencyTypeSupported(IfaceConcurrencyType::P2P)) { + GTEST_SKIP() << "P2P is not supported"; + } std::shared_ptr iface = configureChipForP2pAndGetIface(); std::string iface_name = getP2pIfaceName(iface); @@ -697,6 +716,9 @@ TEST_P(WifiChipAidlTest, GetP2pIface) { * GetApIface */ TEST_P(WifiChipAidlTest, GetApIface) { + if (!isConcurrencyTypeSupported(IfaceConcurrencyType::AP)) { + GTEST_SKIP() << "AP is not supported"; + } std::shared_ptr iface = configureChipForApAndGetIface(); std::string iface_name = getApIfaceName(iface); @@ -755,6 +777,9 @@ TEST_P(WifiChipAidlTest, RemoveStaIface) { * RemoveP2pIface */ TEST_P(WifiChipAidlTest, RemoveP2pIface) { + if (!isConcurrencyTypeSupported(IfaceConcurrencyType::P2P)) { + GTEST_SKIP() << "P2P is not supported"; + } std::shared_ptr iface = configureChipForP2pAndGetIface(); std::string iface_name = getP2pIfaceName(iface); @@ -771,6 +796,9 @@ TEST_P(WifiChipAidlTest, RemoveP2pIface) { * RemoveApIface */ TEST_P(WifiChipAidlTest, RemoveApIface) { + if (!isConcurrencyTypeSupported(IfaceConcurrencyType::AP)) { + GTEST_SKIP() << "AP is not supported"; + } std::shared_ptr iface = configureChipForApAndGetIface(); std::string iface_name = getApIfaceName(iface);