Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ecaa48a authored by Nate Jiang's avatar Nate Jiang
Browse files

[VTS] Seperate Nan and Rtt from Sap test

Bug: 155372761
Test: atest VtsHalWifiApV1_4TargetTest, VtsHalWifiNanV1_4TargetTest, VtsHalWifiRttV1_4TargetTest
Change-Id: I0af11c01e9d87c0837f45b733010c96b5ba94f04
parent 26b2e0b7
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
@@ -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: [
+0 −22
Original line number Diff line number Diff line
@@ -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<IWifiStaIface> 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(