diff options
author | Les Lee <lesl@google.com> | 2023-12-07 04:45:03 +0000 |
---|---|---|
committer | Les Lee <lesl@google.com> | 2023-12-14 10:59:19 +0000 |
commit | af860de0fc50c6bea421cc9822c498f501ecd479 (patch) | |
tree | 5eb19e0fca797985e818378de4a2427e7cd3cc07 | |
parent | 3e595ac343448198dab3c676d513cb7ab85ad8e8 (diff) | |
download | interfaces-af860de0fc50c6bea421cc9822c498f501ecd479.tar.gz |
vts: Add vts to test setVoipMode
Bug: 295885471
Test: atest -c VtsHalWifiChipTargetTest
Change-Id: I976f80006aeb88bde2ae34ca4f9be72cea727d9e
-rw-r--r-- | wifi/aidl/vts/functional/Android.bp | 18 | ||||
-rw-r--r-- | wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp | 30 | ||||
-rw-r--r-- | wifi/hostapd/aidl/vts/functional/Android.bp | 3 | ||||
-rw-r--r-- | wifi/supplicant/aidl/vts/functional/Android.bp | 9 |
4 files changed, 50 insertions, 10 deletions
diff --git a/wifi/aidl/vts/functional/Android.bp b/wifi/aidl/vts/functional/Android.bp index 1277182493..6896110610 100644 --- a/wifi/aidl/vts/functional/Android.bp +++ b/wifi/aidl/vts/functional/Android.bp @@ -39,7 +39,8 @@ cc_test { ], static_libs: [ "VtsHalWifiTargetTestUtil", - "android.hardware.wifi-V1-ndk", + "android.hardware.wifi.common-V1-ndk", + "android.hardware.wifi-V2-ndk", "libwifi-system-iface", ], test_suites: [ @@ -64,7 +65,8 @@ cc_test { ], static_libs: [ "VtsHalWifiTargetTestUtil", - "android.hardware.wifi-V1-ndk", + "android.hardware.wifi.common-V1-ndk", + "android.hardware.wifi-V2-ndk", "libwifi-system-iface", ], test_suites: [ @@ -89,7 +91,8 @@ cc_test { ], static_libs: [ "VtsHalWifiTargetTestUtil", - "android.hardware.wifi-V1-ndk", + "android.hardware.wifi.common-V1-ndk", + "android.hardware.wifi-V2-ndk", "libwifi-system-iface", ], test_suites: [ @@ -114,7 +117,8 @@ cc_test { ], static_libs: [ "VtsHalWifiTargetTestUtil", - "android.hardware.wifi-V1-ndk", + "android.hardware.wifi.common-V1-ndk", + "android.hardware.wifi-V2-ndk", "libwifi-system-iface", ], test_suites: [ @@ -139,7 +143,8 @@ cc_test { ], static_libs: [ "VtsHalWifiTargetTestUtil", - "android.hardware.wifi-V1-ndk", + "android.hardware.wifi.common-V1-ndk", + "android.hardware.wifi-V2-ndk", "libwifi-system-iface", ], test_suites: [ @@ -163,7 +168,8 @@ cc_library_static { "libnativehelper", ], static_libs: [ - "android.hardware.wifi-V1-ndk", + "android.hardware.wifi.common-V1-ndk", + "android.hardware.wifi-V2-ndk", "libwifi-system-iface", ], } diff --git a/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp b/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp index 740f8332b7..a1b9ce1654 100644 --- a/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp +++ b/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp @@ -872,6 +872,36 @@ TEST_P(WifiChipAidlTest, CreateBridgedApIfaceAndremoveIfaceInstanceFromBridgedAp EXPECT_EQ(instances_after_remove.size(), 1); } +/* + * SetVoipMode_off + * Tests the setVoipMode() API with VoIP mode OFF. + */ +TEST_P(WifiChipAidlTest, SetVoipMode_off) { + configureChipForConcurrencyType(IfaceConcurrencyType::STA); + int32_t features = getChipFeatureSet(wifi_chip_); + if (features & static_cast<int32_t>(IWifiChip::FeatureSetMask::SET_VOIP_MODE)) { + auto status = wifi_chip_->setVoipMode(IWifiChip::VoipMode::OFF); + EXPECT_TRUE(status.isOk()); + } else { + GTEST_SKIP() << "setVoipMode() is not supported by vendor."; + } +} + +/* + * SetVoipMode_voice + * Tests the setVoipMode() API with VoIP mode VOICE. + */ +TEST_P(WifiChipAidlTest, SetVoipMode_voice) { + configureChipForConcurrencyType(IfaceConcurrencyType::STA); + int32_t features = getChipFeatureSet(wifi_chip_); + if (features & static_cast<int32_t>(IWifiChip::FeatureSetMask::SET_VOIP_MODE)) { + auto status = wifi_chip_->setVoipMode(IWifiChip::VoipMode::VOICE); + EXPECT_TRUE(status.isOk()); + } else { + GTEST_SKIP() << "setVoipMode() is not supported by vendor."; + } +} + GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(WifiChipAidlTest); INSTANTIATE_TEST_SUITE_P(WifiTest, WifiChipAidlTest, testing::ValuesIn(android::getAidlHalInstanceNames(IWifi::descriptor)), diff --git a/wifi/hostapd/aidl/vts/functional/Android.bp b/wifi/hostapd/aidl/vts/functional/Android.bp index ff35056076..87eee824a0 100644 --- a/wifi/hostapd/aidl/vts/functional/Android.bp +++ b/wifi/hostapd/aidl/vts/functional/Android.bp @@ -36,7 +36,8 @@ cc_test { "android.hardware.wifi@1.4", "android.hardware.wifi@1.5", "android.hardware.wifi@1.6", - "android.hardware.wifi-V1-ndk", + "android.hardware.wifi.common-V1-ndk", + "android.hardware.wifi-V2-ndk", "libwifi-system", "libwifi-system-iface", "VtsHalWifiTargetTestUtil", diff --git a/wifi/supplicant/aidl/vts/functional/Android.bp b/wifi/supplicant/aidl/vts/functional/Android.bp index b2356a0c12..96c13e701f 100644 --- a/wifi/supplicant/aidl/vts/functional/Android.bp +++ b/wifi/supplicant/aidl/vts/functional/Android.bp @@ -51,7 +51,8 @@ cc_test { "VtsHalWifiV1_0TargetTestUtil", "VtsHalWifiV1_5TargetTestUtil", "VtsHalWifiSupplicantV1_0TargetTestUtil", - "android.hardware.wifi-V1-ndk", + "android.hardware.wifi.common-V1-ndk", + "android.hardware.wifi-V2-ndk", "VtsHalWifiTargetTestUtil", ], test_suites: [ @@ -88,7 +89,8 @@ cc_test { "VtsHalWifiV1_0TargetTestUtil", "VtsHalWifiV1_5TargetTestUtil", "VtsHalWifiSupplicantV1_0TargetTestUtil", - "android.hardware.wifi-V1-ndk", + "android.hardware.wifi.common-V1-ndk", + "android.hardware.wifi-V2-ndk", "VtsHalWifiTargetTestUtil", ], test_suites: [ @@ -125,7 +127,8 @@ cc_test { "VtsHalWifiV1_0TargetTestUtil", "VtsHalWifiV1_5TargetTestUtil", "VtsHalWifiSupplicantV1_0TargetTestUtil", - "android.hardware.wifi-V1-ndk", + "android.hardware.wifi.common-V1-ndk", + "android.hardware.wifi-V2-ndk", "VtsHalWifiTargetTestUtil", ], test_suites: [ |