Loading wifi/supplicant/1.0/vts/functional/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,8 @@ cc_test { "VtsHalWifiSupplicantV1_0TargetTestUtil", "android.hardware.wifi.supplicant@1.0", "android.hardware.wifi.supplicant@1.1", "android.hardware.wifi.supplicant@1.2", "android.hardware.wifi.supplicant@1.3", "android.hardware.wifi@1.0", "libgmock", "libwifi-system", Loading wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp +33 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <VtsCoreUtil.h> #include <android/hardware/wifi/1.0/IWifi.h> #include <android/hardware/wifi/supplicant/1.0/ISupplicantStaNetwork.h> #include <android/hardware/wifi/supplicant/1.3/ISupplicantStaNetwork.h> #include <gtest/gtest.h> #include <hidl/GtestPrinter.h> #include <hidl/ServiceManagement.h> Loading Loading @@ -93,6 +94,11 @@ class SupplicantStaNetworkHidlTest EXPECT_TRUE(turnOnExcessiveLogging(supplicant_)); sta_network_ = createSupplicantStaNetwork(supplicant_); ASSERT_NE(sta_network_.get(), nullptr); /* variable used to check if the underlying HAL version is 1.3 or * higher. This is to skip tests which are using deprecated methods. */ v1_3 = ::android::hardware::wifi::supplicant::V1_3:: ISupplicantStaNetwork::castFrom(sta_network_); ssid_.assign(kTestSsidStr, kTestSsidStr + strlen(kTestSsidStr)); } Loading @@ -114,6 +120,8 @@ class SupplicantStaNetworkHidlTest }); } sp<::android::hardware::wifi::supplicant::V1_3::ISupplicantStaNetwork> v1_3 = nullptr; bool isP2pOn_ = false; sp<ISupplicant> supplicant_; // ISupplicantStaNetwork object used for all tests in this fixture. Loading Loading @@ -221,6 +229,9 @@ TEST_P(SupplicantStaNetworkHidlTest, SetGetBssid) { * SetGetKeyMgmt */ TEST_P(SupplicantStaNetworkHidlTest, SetGetKeyMgmt) { if (v1_3 != nullptr) { GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher"; } sta_network_->setKeyMgmt(kTestKeyMgmt, [](const SupplicantStatus& status) { EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code); }); Loading @@ -235,6 +246,9 @@ TEST_P(SupplicantStaNetworkHidlTest, SetGetKeyMgmt) { * SetGetProto */ TEST_P(SupplicantStaNetworkHidlTest, SetGetProto) { if (v1_3 != nullptr) { GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher"; } sta_network_->setProto(kTestProto, [](const SupplicantStatus& status) { EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code); }); Loading Loading @@ -262,6 +276,9 @@ TEST_P(SupplicantStaNetworkHidlTest, SetGetAuthAlg) { * SetGetGroupCipher */ TEST_P(SupplicantStaNetworkHidlTest, SetGetGroupCipher) { if (v1_3 != nullptr) { GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher"; } sta_network_->setGroupCipher( kTestGroupCipher, [](const SupplicantStatus& status) { EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code); Loading @@ -277,6 +294,9 @@ TEST_P(SupplicantStaNetworkHidlTest, SetGetGroupCipher) { * SetGetPairwiseCipher */ TEST_P(SupplicantStaNetworkHidlTest, SetGetPairwiseCipher) { if (v1_3 != nullptr) { GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher"; } sta_network_->setPairwiseCipher( kTestPairwiseCipher, [](const SupplicantStatus& status) { EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code); Loading Loading @@ -627,6 +647,9 @@ TEST_P(SupplicantStaNetworkHidlTest, SetGetEapEngineID) { * Enable */ TEST_P(SupplicantStaNetworkHidlTest, Enable) { if (v1_3 != nullptr) { GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher"; } // wpa_supplicant doesn't perform any connection initiation // unless atleast the Ssid and Ket mgmt params are set. sta_network_->setSsid(ssid_, [](const SupplicantStatus& status) { Loading Loading @@ -654,6 +677,9 @@ TEST_P(SupplicantStaNetworkHidlTest, Enable) { * Disable */ TEST_P(SupplicantStaNetworkHidlTest, Disable) { if (v1_3 != nullptr) { GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher"; } // wpa_supplicant doesn't perform any connection initiation // unless atleast the Ssid and Ket mgmt params are set. sta_network_->setSsid(ssid_, [](const SupplicantStatus& status) { Loading @@ -677,6 +703,9 @@ TEST_P(SupplicantStaNetworkHidlTest, Disable) { * Select. */ TEST_P(SupplicantStaNetworkHidlTest, Select) { if (v1_3 != nullptr) { GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher"; } // wpa_supplicant doesn't perform any connection initiation // unless atleast the Ssid and Ket mgmt params are set. sta_network_->setSsid(ssid_, [](const SupplicantStatus& status) { Loading Loading @@ -788,6 +817,9 @@ TEST_P(SupplicantStaNetworkHidlTest, SetProactiveKeyCaching) { * GetWpsNfcConfigurationToken */ TEST_P(SupplicantStaNetworkHidlTest, GetWpsNfcConfigurationToken) { if (v1_3 != nullptr) { GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher"; } ASSERT_EQ(SupplicantStatusCode::SUCCESS, HIDL_INVOKE(sta_network_, setSsid, ssid_).code); ASSERT_EQ(SupplicantStatusCode::SUCCESS, Loading Loading
wifi/supplicant/1.0/vts/functional/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,8 @@ cc_test { "VtsHalWifiSupplicantV1_0TargetTestUtil", "android.hardware.wifi.supplicant@1.0", "android.hardware.wifi.supplicant@1.1", "android.hardware.wifi.supplicant@1.2", "android.hardware.wifi.supplicant@1.3", "android.hardware.wifi@1.0", "libgmock", "libwifi-system", Loading
wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp +33 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <VtsCoreUtil.h> #include <android/hardware/wifi/1.0/IWifi.h> #include <android/hardware/wifi/supplicant/1.0/ISupplicantStaNetwork.h> #include <android/hardware/wifi/supplicant/1.3/ISupplicantStaNetwork.h> #include <gtest/gtest.h> #include <hidl/GtestPrinter.h> #include <hidl/ServiceManagement.h> Loading Loading @@ -93,6 +94,11 @@ class SupplicantStaNetworkHidlTest EXPECT_TRUE(turnOnExcessiveLogging(supplicant_)); sta_network_ = createSupplicantStaNetwork(supplicant_); ASSERT_NE(sta_network_.get(), nullptr); /* variable used to check if the underlying HAL version is 1.3 or * higher. This is to skip tests which are using deprecated methods. */ v1_3 = ::android::hardware::wifi::supplicant::V1_3:: ISupplicantStaNetwork::castFrom(sta_network_); ssid_.assign(kTestSsidStr, kTestSsidStr + strlen(kTestSsidStr)); } Loading @@ -114,6 +120,8 @@ class SupplicantStaNetworkHidlTest }); } sp<::android::hardware::wifi::supplicant::V1_3::ISupplicantStaNetwork> v1_3 = nullptr; bool isP2pOn_ = false; sp<ISupplicant> supplicant_; // ISupplicantStaNetwork object used for all tests in this fixture. Loading Loading @@ -221,6 +229,9 @@ TEST_P(SupplicantStaNetworkHidlTest, SetGetBssid) { * SetGetKeyMgmt */ TEST_P(SupplicantStaNetworkHidlTest, SetGetKeyMgmt) { if (v1_3 != nullptr) { GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher"; } sta_network_->setKeyMgmt(kTestKeyMgmt, [](const SupplicantStatus& status) { EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code); }); Loading @@ -235,6 +246,9 @@ TEST_P(SupplicantStaNetworkHidlTest, SetGetKeyMgmt) { * SetGetProto */ TEST_P(SupplicantStaNetworkHidlTest, SetGetProto) { if (v1_3 != nullptr) { GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher"; } sta_network_->setProto(kTestProto, [](const SupplicantStatus& status) { EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code); }); Loading Loading @@ -262,6 +276,9 @@ TEST_P(SupplicantStaNetworkHidlTest, SetGetAuthAlg) { * SetGetGroupCipher */ TEST_P(SupplicantStaNetworkHidlTest, SetGetGroupCipher) { if (v1_3 != nullptr) { GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher"; } sta_network_->setGroupCipher( kTestGroupCipher, [](const SupplicantStatus& status) { EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code); Loading @@ -277,6 +294,9 @@ TEST_P(SupplicantStaNetworkHidlTest, SetGetGroupCipher) { * SetGetPairwiseCipher */ TEST_P(SupplicantStaNetworkHidlTest, SetGetPairwiseCipher) { if (v1_3 != nullptr) { GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher"; } sta_network_->setPairwiseCipher( kTestPairwiseCipher, [](const SupplicantStatus& status) { EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code); Loading Loading @@ -627,6 +647,9 @@ TEST_P(SupplicantStaNetworkHidlTest, SetGetEapEngineID) { * Enable */ TEST_P(SupplicantStaNetworkHidlTest, Enable) { if (v1_3 != nullptr) { GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher"; } // wpa_supplicant doesn't perform any connection initiation // unless atleast the Ssid and Ket mgmt params are set. sta_network_->setSsid(ssid_, [](const SupplicantStatus& status) { Loading Loading @@ -654,6 +677,9 @@ TEST_P(SupplicantStaNetworkHidlTest, Enable) { * Disable */ TEST_P(SupplicantStaNetworkHidlTest, Disable) { if (v1_3 != nullptr) { GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher"; } // wpa_supplicant doesn't perform any connection initiation // unless atleast the Ssid and Ket mgmt params are set. sta_network_->setSsid(ssid_, [](const SupplicantStatus& status) { Loading @@ -677,6 +703,9 @@ TEST_P(SupplicantStaNetworkHidlTest, Disable) { * Select. */ TEST_P(SupplicantStaNetworkHidlTest, Select) { if (v1_3 != nullptr) { GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher"; } // wpa_supplicant doesn't perform any connection initiation // unless atleast the Ssid and Ket mgmt params are set. sta_network_->setSsid(ssid_, [](const SupplicantStatus& status) { Loading Loading @@ -788,6 +817,9 @@ TEST_P(SupplicantStaNetworkHidlTest, SetProactiveKeyCaching) { * GetWpsNfcConfigurationToken */ TEST_P(SupplicantStaNetworkHidlTest, GetWpsNfcConfigurationToken) { if (v1_3 != nullptr) { GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher"; } ASSERT_EQ(SupplicantStatusCode::SUCCESS, HIDL_INVOKE(sta_network_, setSsid, ssid_).code); ASSERT_EQ(SupplicantStatusCode::SUCCESS, Loading