From 9ecaa48a02dc3ee3a7d68049036a53ec7dd35fe9 Mon Sep 17 00:00:00 2001 From: Nate Jiang Date: Tue, 12 May 2020 17:29:14 -0700 Subject: [PATCH] [VTS] Seperate Nan and Rtt from Sap test Bug: 155372761 Test: atest VtsHalWifiApV1_4TargetTest, VtsHalWifiNanV1_4TargetTest, VtsHalWifiRttV1_4TargetTest Change-Id: I0af11c01e9d87c0837f45b733010c96b5ba94f04 --- wifi/1.4/vts/functional/Android.bp | 44 +++++++++++++++++++ .../vts/functional/wifi_chip_hidl_test.cpp | 22 ---------- 2 files changed, 44 insertions(+), 22 deletions(-) diff --git a/wifi/1.4/vts/functional/Android.bp b/wifi/1.4/vts/functional/Android.bp index 3824c3aecf..59a35e0262 100644 --- a/wifi/1.4/vts/functional/Android.bp +++ b/wifi/1.4/vts/functional/Android.bp @@ -21,7 +21,51 @@ cc_test { srcs: [ "wifi_ap_iface_hidl_test.cpp", "wifi_chip_hidl_test.cpp", + ], + static_libs: [ + "VtsHalWifiV1_0TargetTestUtil", + "android.hardware.wifi@1.0", + "android.hardware.wifi@1.1", + "android.hardware.wifi@1.2", + "android.hardware.wifi@1.3", + "android.hardware.wifi@1.4", + "libwifi-system-iface", + ], + test_suites: [ + "general-tests", + "vts", + ], +} + +// These tests are split out so that they can be conditioned on presence of the +// "android.hardware.wifi.aware" feature. +cc_test { + name: "VtsHalWifiNanV1_4TargetTest", + defaults: ["VtsHalTargetTestDefaults"], + srcs: [ "wifi_nan_iface_hidl_test.cpp", + ], + static_libs: [ + "VtsHalWifiV1_0TargetTestUtil", + "android.hardware.wifi@1.0", + "android.hardware.wifi@1.1", + "android.hardware.wifi@1.2", + "android.hardware.wifi@1.3", + "android.hardware.wifi@1.4", + "libwifi-system-iface", + ], + test_suites: [ + "general-tests", + "vts", + ], +} + +// These tests are split out so that they can be conditioned on presence of the +// "android.hardware.wifi.rtt" feature. +cc_test { + name: "VtsHalWifiRttV1_4TargetTest", + defaults: ["VtsHalTargetTestDefaults"], + srcs: [ "wifi_rtt_controller_hidl_test.cpp", ], static_libs: [ diff --git a/wifi/1.4/vts/functional/wifi_chip_hidl_test.cpp b/wifi/1.4/vts/functional/wifi_chip_hidl_test.cpp index 1c395500a0..be5c3bde9e 100644 --- a/wifi/1.4/vts/functional/wifi_chip_hidl_test.cpp +++ b/wifi/1.4/vts/functional/wifi_chip_hidl_test.cpp @@ -150,28 +150,6 @@ TEST_P(WifiChipHidlTest, registerEventCallback_1_4) { } } -/* - * createRttController_1_4 - * Ensures that an instance of the IWifiRttController proxy object is - * successfully created. - */ -TEST_P(WifiChipHidlTest, createRttController_1_4) { - configureChipForIfaceType(IfaceType::STA, true); - - const auto& status_and_iface = HIDL_INVOKE(wifi_chip_, createStaIface); - EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_iface.first.code); - sp iface = IWifiStaIface::castFrom(status_and_iface.second); - EXPECT_NE(nullptr, iface.get()); - - const auto& status_and_controller = - HIDL_INVOKE(wifi_chip_, createRttController_1_4, iface); - if (status_and_controller.first.code != - WifiStatusCode::ERROR_NOT_SUPPORTED) { - EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_controller.first.code); - EXPECT_NE(nullptr, status_and_controller.second.get()); - } -} - INSTANTIATE_TEST_SUITE_P( PerInstance, WifiChipHidlTest, testing::ValuesIn(android::hardware::getAllHalInstanceNames(