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

Commit 8c0fec12 authored by Nate Jiang's avatar Nate Jiang
Browse files

Skip test when NAN or RTT feature not supported

Bug: 155372761
Test: atest VtsHalWifiApV1_4TargetTest, VtsHalWifiNanV1_4TargetTest, VtsHalWifiRttV1_4TargetTest
SingleDeviceTest
Merged-In: I04bfffe9dc587e3f7209601c3712422b6e2d165c
Change-Id: I04bfffe9dc587e3f7209601c3712422b6e2d165c
parent 74b04e96
Loading
Loading
Loading
Loading
+17 −8
Original line number Diff line number Diff line
@@ -23,14 +23,14 @@ cc_library_static {
        "wifi_hidl_test_utils.cpp",
    ],
    export_include_dirs: [
        "."
        ".",
    ],
    shared_libs: [
        "libnativehelper",
    ],
    static_libs: [
        "android.hardware.wifi@1.0",
        "libwifi-system-iface"
        "libwifi-system-iface",
    ],
}

@@ -49,9 +49,12 @@ cc_test {
        "android.hardware.wifi@1.1",
        "android.hardware.wifi@1.2",
        "android.hardware.wifi@1.3",
        "libwifi-system-iface"
        "libwifi-system-iface",
    ],
    test_suites: [
        "general-tests",
        "vts",
    ],
    test_suites: ["general-tests", "vts"],
}

// These tests are split out so that they can be conditioned on presence of the
@@ -66,9 +69,12 @@ cc_test {
    static_libs: [
        "VtsHalWifiV1_0TargetTestUtil",
        "android.hardware.wifi@1.0",
        "libwifi-system-iface"
        "libwifi-system-iface",
    ],
    test_suites: [
        "general-tests",
        "vts",
    ],
    test_suites: ["general-tests", "vts"],
}

// These tests are split out so that they can be conditioned on presence of
@@ -83,7 +89,10 @@ cc_test {
    static_libs: [
        "VtsHalWifiV1_0TargetTestUtil",
        "android.hardware.wifi@1.0",
        "libwifi-system-iface"
        "libwifi-system-iface",
    ],
    test_suites: [
        "general-tests",
        "vts",
    ],
    test_suites: ["general-tests", "vts"],
}
+3 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

#include <android-base/logging.h>

#include <VtsCoreUtil.h>
#include <android/hardware/wifi/1.0/IWifi.h>
#include <android/hardware/wifi/1.0/IWifiRttController.h>
#include <gtest/gtest.h>
@@ -38,6 +39,8 @@ using ::android::hardware::wifi::V1_0::WifiStatusCode;
class WifiRttControllerHidlTest : public ::testing::TestWithParam<std::string> {
   public:
    virtual void SetUp() override {
        if (!::testing::deviceSupportsFeature("android.hardware.wifi.rtt"))
            GTEST_SKIP() << "Skipping this test since RTT is not supported.";
        // Make sure test starts with a clean state
        stopWifi(GetInstanceName());
    }
+7 −3
Original line number Diff line number Diff line
@@ -18,14 +18,18 @@ cc_test {
    name: "VtsHalWifiV1_1TargetTest",
    defaults: ["VtsHalTargetTestDefaults"],
    srcs: [
        "wifi_chip_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",
        "libwifi-system-iface"
        "libwifi-system-iface",
    ],
    test_suites: [
        "general-tests",
        "vts",
    ],
    test_suites: ["general-tests", "vts"],
}
+10 −5
Original line number Diff line number Diff line
@@ -27,10 +27,13 @@ cc_test {
        "android.hardware.wifi@1.1",
        "android.hardware.wifi@1.2",
        "android.hardware.wifi@1.3",
        "libwifi-system-iface"
        "libwifi-system-iface",
    ],
    disable_framework: true,
    test_suites: ["general-tests", "vts"],
    test_suites: [
        "general-tests",
        "vts",
    ],
}

cc_test {
@@ -44,8 +47,10 @@ cc_test {
        "android.hardware.wifi@1.0",
        "android.hardware.wifi@1.1",
        "android.hardware.wifi@1.2",
        "libwifi-system-iface"
        "libwifi-system-iface",
    ],
    test_suites: [
        "general-tests",
        "vts",
    ],
    disable_framework: true,
    test_suites: ["general-tests", "vts"],
}
+3 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

#include <android-base/logging.h>

#include <VtsCoreUtil.h>
#include <android/hardware/wifi/1.2/IWifi.h>
#include <android/hardware/wifi/1.2/IWifiNanIface.h>
#include <android/hardware/wifi/1.2/IWifiNanIfaceEventCallback.h>
@@ -50,6 +51,8 @@ android::sp<android::hardware::wifi::V1_2::IWifiNanIface> getWifiNanIface_1_2(
class WifiNanIfaceHidlTest : public ::testing::TestWithParam<std::string> {
   public:
    virtual void SetUp() override {
        if (!::testing::deviceSupportsFeature("android.hardware.wifi.aware"))
            GTEST_SKIP() << "Skipping this test since NAN is not supported.";
        // Make sure to start with a clean state
        stopWifi(GetInstanceName());

Loading