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

Commit b3fba1d7 authored by Les Lee's avatar Les Lee Committed by Android (Google) Code Review
Browse files

Merge "wifi(vts): Precondition AP tests on existence of hostapd HAL" into sc-v2-dev

parents b828beb0 82b41e6a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -107,8 +107,10 @@ cc_test {
    static_libs: [
        "VtsHalWifiV1_0TargetTestUtil",
        "android.hardware.wifi@1.0",
        "android.hardware.wifi.hostapd@1.0",
        "libwifi-system-iface",
    ],
    disable_framework: true,
    test_suites: [
        "general-tests",
        "vts",
+6 −1
Original line number Diff line number Diff line
@@ -15,9 +15,9 @@
 */

#include <android-base/logging.h>

#include <android/hardware/wifi/1.0/IWifi.h>
#include <android/hardware/wifi/1.0/IWifiApIface.h>
#include <android/hardware/wifi/hostapd/1.0/IHostapd.h>
#include <gtest/gtest.h>
#include <hidl/GtestPrinter.h>
#include <hidl/ServiceManagement.h>
@@ -26,6 +26,7 @@
#include "wifi_hidl_test_utils.h"

using ::android::sp;
using ::android::hardware::wifi::hostapd::V1_0::IHostapd;
using ::android::hardware::wifi::V1_0::IfaceType;
using ::android::hardware::wifi::V1_0::IWifi;
using ::android::hardware::wifi::V1_0::IWifiApIface;
@@ -38,6 +39,10 @@ using ::android::hardware::wifi::V1_0::WifiStatusCode;
class WifiApIfaceHidlTest : public ::testing::TestWithParam<std::string> {
   public:
    virtual void SetUp() override {
        if (android::hardware::getAllHalInstanceNames(IHostapd::descriptor)
                .empty()) {
            GTEST_SKIP() << "Device does not support AP";
        }
        // Make sure test starts with a clean state
        stopWifi(GetInstanceName());

+6 −1
Original line number Diff line number Diff line
@@ -15,9 +15,9 @@
 */

#include <android-base/logging.h>

#include <android/hardware/wifi/1.0/IWifi.h>
#include <android/hardware/wifi/1.0/IWifiChip.h>
#include <android/hardware/wifi/hostapd/1.0/IHostapd.h>
#include <gtest/gtest.h>
#include <hidl/GtestPrinter.h>
#include <hidl/ServiceManagement.h>
@@ -26,6 +26,7 @@
#include "wifi_hidl_test_utils.h"

using ::android::sp;
using ::android::hardware::wifi::hostapd::V1_0::IHostapd;
using ::android::hardware::wifi::V1_0::ChipModeId;
using ::android::hardware::wifi::V1_0::IfaceType;
using ::android::hardware::wifi::V1_0::IWifi;
@@ -41,6 +42,10 @@ using ::android::hardware::wifi::V1_0::WifiStatusCode;
class WifiChipHidlApTest : public ::testing::TestWithParam<std::string> {
   public:
    virtual void SetUp() override {
        if (android::hardware::getAllHalInstanceNames(IHostapd::descriptor)
                .empty()) {
            GTEST_SKIP() << "Device does not support AP";
        }
        // Make sure test starts with a clean state
        stopWifi(GetInstanceName());

+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ cc_test {
        "android.hardware.wifi@1.5",
        "libwifi-system-iface",
    ],
    disable_framework: true,
    test_suites: [
        "general-tests",
        "vts",
+24 −2
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@
// limitations under the License.
//

// SoftAP-specific tests, similar to VtsHalWifiApV1_0TargetTest.
package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
@@ -24,12 +23,33 @@ package {
    default_applicable_licenses: ["hardware_interfaces_license"],
}

cc_test {
    name: "VtsHalWifiV1_4TargetTest",
    defaults: ["VtsHalTargetTestDefaults"],
    srcs: [
        "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",
    ],
}

// SoftAP-specific tests, similar to VtsHalWifiApV1_0TargetTest.
cc_test {
    name: "VtsHalWifiApV1_4TargetTest",
    defaults: ["VtsHalTargetTestDefaults"],
    srcs: [
        "wifi_ap_iface_hidl_test.cpp",
        "wifi_chip_hidl_test.cpp",
    ],
    static_libs: [
        "VtsHalWifiV1_0TargetTestUtil",
@@ -38,8 +58,10 @@ cc_test {
        "android.hardware.wifi@1.2",
        "android.hardware.wifi@1.3",
        "android.hardware.wifi@1.4",
        "android.hardware.wifi.hostapd@1.0",
        "libwifi-system-iface",
    ],
    disable_framework: true,
    test_suites: [
        "general-tests",
        "vts",
Loading