Loading wifi/hostapd/1.0/vts/functional/hostapd_hidl_test.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ constexpr int kIfaceInvalidChannel = 567; class HostapdHidlTest : public ::testing::VtsHalHidlTargetTestBase { public: virtual void SetUp() override { stopSupplicantIfNeeded(); startHostapdAndWaitForHidlService(); hostapd_ = getHostapd(); ASSERT_NE(hostapd_.get(), nullptr); Loading wifi/hostapd/1.0/vts/functional/hostapd_hidl_test_utils.cpp +16 −4 Original line number Diff line number Diff line Loading @@ -23,24 +23,26 @@ #include <wifi_system/hostapd_manager.h> #include <wifi_system/interface_tool.h> #include <wifi_system/supplicant_manager.h> #include "hostapd_hidl_test_utils.h" #include "wifi_hidl_test_utils.h" using ::android::sp; using ::android::hardware::configureRpcThreadpool; using ::android::hardware::joinRpcThreadpool; using ::android::hardware::hidl_string; using ::android::hardware::hidl_vec; using ::android::hardware::joinRpcThreadpool; using ::android::hardware::Return; using ::android::hardware::Void; using ::android::hardware::wifi::V1_0::ChipModeId; using ::android::hardware::wifi::V1_0::IWifiChip; using ::android::hardware::wifi::hostapd::V1_0::IHostapd; using ::android::hardware::wifi::hostapd::V1_0::HostapdStatus; using ::android::hardware::wifi::hostapd::V1_0::HostapdStatusCode; using ::android::hardware::wifi::hostapd::V1_0::IHostapd; using ::android::hardware::wifi::V1_0::ChipModeId; using ::android::hardware::wifi::V1_0::IWifiChip; using ::android::hidl::manager::V1_0::IServiceNotification; using ::android::wifi_system::HostapdManager; using ::android::wifi_system::SupplicantManager; extern WifiHostapdHidlEnvironment* gEnv; Loading Loading @@ -108,6 +110,16 @@ class ServiceNotificationListener : public IServiceNotification { std::condition_variable condition_; }; void stopSupplicantIfNeeded() { SupplicantManager supplicant_manager; if (supplicant_manager.IsSupplicantRunning()) { LOG(INFO) << "Supplicant is running, stop supplicant first."; ASSERT_TRUE(supplicant_manager.StopSupplicant()); deInitilializeDriverAndFirmware(); ASSERT_FALSE(supplicant_manager.IsSupplicantRunning()); } } void stopHostapd() { HostapdManager hostapd_manager; Loading wifi/hostapd/1.0/vts/functional/hostapd_hidl_test_utils.h +1 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ // Used to stop the android wifi framework before every test. void stopWifiFramework(); void startWifiFramework(); void stopSupplicantIfNeeded(); void stopHostapd(); // Used to configure the chip, driver and start wpa_hostapd before every // test. Loading wifi/hostapd/1.1/vts/functional/hostapd_hidl_test.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ constexpr int kIfaceInvalidChannel = 567; class HostapdHidlTest : public ::testing::VtsHalHidlTargetTestBase { public: virtual void SetUp() override { stopSupplicantIfNeeded(); startHostapdAndWaitForHidlService(); hostapd_ = getHostapd_1_1(); ASSERT_NE(hostapd_.get(), nullptr); Loading Loading
wifi/hostapd/1.0/vts/functional/hostapd_hidl_test.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ constexpr int kIfaceInvalidChannel = 567; class HostapdHidlTest : public ::testing::VtsHalHidlTargetTestBase { public: virtual void SetUp() override { stopSupplicantIfNeeded(); startHostapdAndWaitForHidlService(); hostapd_ = getHostapd(); ASSERT_NE(hostapd_.get(), nullptr); Loading
wifi/hostapd/1.0/vts/functional/hostapd_hidl_test_utils.cpp +16 −4 Original line number Diff line number Diff line Loading @@ -23,24 +23,26 @@ #include <wifi_system/hostapd_manager.h> #include <wifi_system/interface_tool.h> #include <wifi_system/supplicant_manager.h> #include "hostapd_hidl_test_utils.h" #include "wifi_hidl_test_utils.h" using ::android::sp; using ::android::hardware::configureRpcThreadpool; using ::android::hardware::joinRpcThreadpool; using ::android::hardware::hidl_string; using ::android::hardware::hidl_vec; using ::android::hardware::joinRpcThreadpool; using ::android::hardware::Return; using ::android::hardware::Void; using ::android::hardware::wifi::V1_0::ChipModeId; using ::android::hardware::wifi::V1_0::IWifiChip; using ::android::hardware::wifi::hostapd::V1_0::IHostapd; using ::android::hardware::wifi::hostapd::V1_0::HostapdStatus; using ::android::hardware::wifi::hostapd::V1_0::HostapdStatusCode; using ::android::hardware::wifi::hostapd::V1_0::IHostapd; using ::android::hardware::wifi::V1_0::ChipModeId; using ::android::hardware::wifi::V1_0::IWifiChip; using ::android::hidl::manager::V1_0::IServiceNotification; using ::android::wifi_system::HostapdManager; using ::android::wifi_system::SupplicantManager; extern WifiHostapdHidlEnvironment* gEnv; Loading Loading @@ -108,6 +110,16 @@ class ServiceNotificationListener : public IServiceNotification { std::condition_variable condition_; }; void stopSupplicantIfNeeded() { SupplicantManager supplicant_manager; if (supplicant_manager.IsSupplicantRunning()) { LOG(INFO) << "Supplicant is running, stop supplicant first."; ASSERT_TRUE(supplicant_manager.StopSupplicant()); deInitilializeDriverAndFirmware(); ASSERT_FALSE(supplicant_manager.IsSupplicantRunning()); } } void stopHostapd() { HostapdManager hostapd_manager; Loading
wifi/hostapd/1.0/vts/functional/hostapd_hidl_test_utils.h +1 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ // Used to stop the android wifi framework before every test. void stopWifiFramework(); void startWifiFramework(); void stopSupplicantIfNeeded(); void stopHostapd(); // Used to configure the chip, driver and start wpa_hostapd before every // test. Loading
wifi/hostapd/1.1/vts/functional/hostapd_hidl_test.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ constexpr int kIfaceInvalidChannel = 567; class HostapdHidlTest : public ::testing::VtsHalHidlTargetTestBase { public: virtual void SetUp() override { stopSupplicantIfNeeded(); startHostapdAndWaitForHidlService(); hostapd_ = getHostapd_1_1(); ASSERT_NE(hostapd_.get(), nullptr); Loading