Wifi: Fix VTS tests broken due to uprev to Vendor HAL 1.6

This commit skips the tests for the deprecated HAL APIs due to the
addition of the Vendor HAL ver. 1.6

Bug: 220201314
Test: atest VtsHalWifiRttV1_4TargetTest
Test: atest VtsHalWifiV1_5TargetTest
Change-Id: I9c15249effa9a678115bf644012c0047ad13c66b
This commit is contained in:
Ahmed ElArabawy
2022-02-17 18:25:51 -08:00
parent 6d66167031
commit 7f40eee612
2 changed files with 14 additions and 2 deletions

View File

@@ -66,7 +66,9 @@ class WifiRttControllerHidlTest : public ::testing::TestWithParam<std::string> {
stopWifi(GetInstanceName());
wifi_rtt_controller_ = getWifiRttController();
ASSERT_NE(nullptr, wifi_rtt_controller_.get());
if (wifi_rtt_controller_.get() == nullptr) {
GTEST_SKIP() << "Skipping this test since API is deprecated.";
}
// Check RTT support before we run the test.
std::pair<WifiStatus, RttCapabilities> status_and_caps;
@@ -79,7 +81,7 @@ class WifiRttControllerHidlTest : public ::testing::TestWithParam<std::string> {
virtual void TearDown() override { stopWifi(GetInstanceName()); }
// A simple test implementation of WifiChipEventCallback.
// A simple test implementation of WifiRttControllerEventCallback.
class WifiRttControllerEventCallback
: public ::testing::VtsHalHidlTargetCallbackBase<
WifiRttControllerHidlTest>,
@@ -122,6 +124,11 @@ class WifiRttControllerHidlTest : public ::testing::TestWithParam<std::string> {
const auto& status_and_controller =
HIDL_INVOKE(wifi_chip, createRttController_1_4, wifi_sta_iface);
if (status_and_controller.first.code == WifiStatusCode::ERROR_NOT_SUPPORTED) {
return nullptr;
}
EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_controller.first.code);
EXPECT_NE(nullptr, status_and_controller.second.get());

View File

@@ -94,6 +94,11 @@ TEST_P(WifiStaIfaceHidlTest, GetLinkLayerStats_1_5) {
// Retrieve link layer stats.
const auto& status_and_stats =
HIDL_INVOKE(wifi_sta_iface_, getLinkLayerStats_1_5);
if (status_and_stats.first.code == WifiStatusCode::ERROR_NOT_SUPPORTED) {
GTEST_SKIP() << "Skipping this test since API is deprecated.";
}
EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_stats.first.code);
EXPECT_GT(status_and_stats.second.timeStampInMs, 0u);
// Try to create 2nd iface. If yes, it should fill in the duty cycle field.