vts: Use global hostapd_ since teardown will call terminate function

aosp/1427815 add invoke terminate function in teardown function.
It will cause Create Test case fail since Create killed global hostapd_
service to re-generate the local one.
Use global hostapd_ to replace local variable to make teardown function
work normally.

Bug: 169248773
Test: atest -c VtsHalWifiHostapdV1_2TargetTest
Test: atest -c VtsHalWifiHostapdV1_1TargetTest
Test: atest -c VtsHalWifiHostapdV1_0TargetTest
Change-Id: I6300a626db76e68873bbc34c489a9a8ee2d55e7a
This commit is contained in:
lesl
2020-09-24 16:05:39 +08:00
committed by Les Lee
parent 51dc008bd3
commit b688ea7e73

View File

@@ -145,8 +145,8 @@ TEST_P(HostapdHidlTest, Create) {
stopHostapd(wifi_instance_name_);
startHostapdAndWaitForHidlService(wifi_instance_name_,
hostapd_instance_name_);
sp<IHostapd> hostapd = IHostapd::getService(hostapd_instance_name_);
EXPECT_NE(nullptr, hostapd.get());
hostapd_ = IHostapd::getService(hostapd_instance_name_);
EXPECT_NE(nullptr, hostapd_.get());
}
/**