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

Commit 293dc5dc authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "wpa_supplicant(interface): Support add/remove interfaces"

parents 7d1e0405 781d183a
Loading
Loading
Loading
Loading
+19 −1
Original line number Diff line number Diff line
@@ -14,19 +14,37 @@
// limitations under the License.
//

cc_library_static {
    name: "VtsHalWifiSupplicantV1_0TargetTestUtil",
    defaults: ["VtsHalTargetTestDefaults"],
    srcs: ["supplicant_hidl_test_utils.cpp"],
    export_include_dirs: [
        "."
    ],
    static_libs: [
        "VtsHalWifiV1_0TargetTestUtil",
        "android.hardware.wifi.supplicant@1.0",
        "android.hardware.wifi@1.0",
        "libcrypto",
        "libgmock",
        "libwifi-system",
        "libwifi-system-iface",
    ],
}

cc_test {
    name: "VtsHalWifiSupplicantV1_0TargetTest",
    defaults: ["VtsHalTargetTestDefaults"],
    srcs: [
        "VtsHalWifiSupplicantV1_0TargetTest.cpp",
        "supplicant_hidl_test.cpp",
        "supplicant_hidl_test_utils.cpp",
        "supplicant_p2p_iface_hidl_test.cpp",
        "supplicant_sta_iface_hidl_test.cpp",
        "supplicant_sta_network_hidl_test.cpp",
    ],
    static_libs: [
        "VtsHalWifiV1_0TargetTestUtil",
        "VtsHalWifiSupplicantV1_0TargetTestUtil",
        "android.hardware.wifi.supplicant@1.0",
        "android.hardware.wifi@1.0",
        "libcrypto",
+30 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@
package android.hardware.wifi.supplicant@1.1;

import @1.0::ISupplicant;
import @1.0::ISupplicantIface;
import @1.0::SupplicantStatus;

/**
 * Interface exposed by the supplicant HIDL service registered
@@ -24,4 +26,32 @@ import @1.0::ISupplicant;
 * This is the root level object for any the supplicant interactions.
 */
interface ISupplicant extends @1.0::ISupplicant {
    /**
     * Registers a wireless interface in supplicant.
     *
     * @param ifaceInfo Combination of the interface type and name(e.g wlan0).
     * @return status Status of the operation.
     *         Possible status codes:
     *         |SupplicantStatusCode.SUCCESS|,
     *         |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
     *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
     *         |SupplicantStatusCode.FAILURE_IFACE_EXISTS|
     * @return iface HIDL interface object representing the interface if
     *         successful, null otherwise.
     */
    addInterface(IfaceInfo ifaceInfo)
        generates (SupplicantStatus status, ISupplicantIface iface);

    /**
     * Deregisters a wireless interface from supplicant.
     *
     * @param ifaceInfo Combination of the interface type and name(e.g wlan0).
     * @return status Status of the operation.
     *         Possible status codes:
     *         |SupplicantStatusCode.SUCCESS|,
     *         |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
     *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
     *         |SupplicantStatusCode.FAILURE_IFACE_UNKOWN|
     */
    removeInterface(IfaceInfo ifaceInfo) generates (SupplicantStatus status);
};
+2 −0
Original line number Diff line number Diff line
LOCAL_PATH := $(call my-dir)
include $(call all-makefiles-under,$(LOCAL_PATH))
+56 −0
Original line number Diff line number Diff line
//
// Copyright (C) 2017 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

cc_library_static {
    name: "VtsHalWifiSupplicantV1_1TargetTestUtil",
    defaults: ["VtsHalTargetTestDefaults"],
    srcs: ["supplicant_hidl_test_utils_1_1.cpp"],
    export_include_dirs: [
        "."
    ],
    static_libs: [
        "VtsHalWifiV1_0TargetTestUtil",
        "VtsHalWifiSupplicantV1_0TargetTestUtil",
        "android.hardware.wifi.supplicant@1.0",
        "android.hardware.wifi.supplicant@1.1",
        "android.hardware.wifi@1.0",
        "libcrypto",
        "libgmock",
        "libwifi-system",
        "libwifi-system-iface",
    ],
}

cc_test {
    name: "VtsHalWifiSupplicantV1_1TargetTest",
    defaults: ["VtsHalTargetTestDefaults"],
    srcs: [
        "VtsHalWifiSupplicantV1_1TargetTest.cpp",
        "supplicant_hidl_test.cpp",
    ],
    static_libs: [
        "VtsHalWifiV1_0TargetTestUtil",
        "VtsHalWifiSupplicantV1_0TargetTestUtil",
        "VtsHalWifiSupplicantV1_1TargetTestUtil",
        "android.hardware.wifi.supplicant@1.0",
        "android.hardware.wifi.supplicant@1.1",
        "android.hardware.wifi@1.0",
        "libcrypto",
        "libgmock",
        "libwifi-system",
        "libwifi-system-iface",
    ],
}
+35 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2016 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <android-base/logging.h>

#include <VtsHalHidlTargetTestBase.h>

#include "supplicant_hidl_test_utils.h"

class SupplicantHidlEnvironment : public ::testing::Environment {
   public:
    virtual void SetUp() override { stopSupplicant(); }
    virtual void TearDown() override {}
};

int main(int argc, char** argv) {
    ::testing::AddGlobalTestEnvironment(new SupplicantHidlEnvironment);
    ::testing::InitGoogleTest(&argc, argv);
    int status = RUN_ALL_TESTS();
    LOG(INFO) << "Test result = " << status;
    return status;
}
Loading