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

Commit b9c9ce41 authored by Chris Manton's avatar Chris Manton
Browse files

mock: Link with libfmq and not a mock

Bug: 311795290
Test: atest net_test_btif_hh

Change-Id: Ic6259fac42d33ea50eb423fec2ec9435896542eb
parent 93b4632e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -606,7 +606,6 @@ cc_test {
        ":TestMockHci",
        ":TestMockMainShim",
        ":TestMockStack",
        ":TestMockSystemLibfmq",
        ":TestMockUdrv",
        ":TestMockUtils",
        "test/btif_hh_test.cc",
@@ -621,6 +620,7 @@ cc_test {
        "libbase",
        "libcrypto",
        "libcutils",
        "libfmq",
        "libhidlbase",
        "liblog",
        "libutils",
@@ -752,7 +752,6 @@ cc_test {
        ":TestMockHci",
        ":TestMockMainShim",
        ":TestMockStack",
        ":TestMockSystemLibfmq",
        ":TestMockUdrv",
        ":TestMockUtils",
        "test/btif_core_test.cc",
@@ -767,6 +766,7 @@ cc_test {
        "libbase",
        "libcrypto",
        "libcutils",
        "libfmq",
        "libhidlbase",
        "liblog",
        "libutils",
+0 −7
Original line number Diff line number Diff line
@@ -280,13 +280,6 @@ filegroup {
    ],
}

filegroup {
    name: "TestMockSystemLibfmq",
    srcs: [
        "mock/mock_system_libfmq_*.cc",
    ],
}

filegroup {
    name: "TestMockUdrv",
    srcs: [
+0 −77
Original line number Diff line number Diff line
/*
 * Copyright 2021 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.
 */

/*
 * Generated mock file from original source file
 *   Functions generated:11
 */

#include <fmq/EventFlag.h>

#include <string>

#include "test/common/mock_functions.h"

using namespace android;
using namespace android::hardware;

namespace android {
namespace hardware {
namespace details {

void logError(const std::string& message) {}
void check(bool exp, const char* message) {}

}  // namespace details
}  // namespace hardware
}  // namespace android

EventFlag::EventFlag(std::atomic<uint32_t>* fwAddr, status_t* status) {
  inc_func_call_count(__func__);
}
EventFlag::~EventFlag() { inc_func_call_count(__func__); }
status_t EventFlag::createEventFlag(std::atomic<uint32_t>* fwAddr,
                                    EventFlag** flag) {
  inc_func_call_count(__func__);
  return 0;
}
status_t EventFlag::deleteEventFlag(EventFlag** evFlag) {
  inc_func_call_count(__func__);
  return 0;
}
status_t EventFlag::unmapEventFlagWord(std::atomic<uint32_t>* efWordPtr,
                                       bool* efWordNeedsUnmapping) {
  inc_func_call_count(__func__);
  return 0;
}
status_t EventFlag::wait(uint32_t bitmask, uint32_t* efState,
                         int64_t timeoutNanoSeconds, bool retry) {
  inc_func_call_count(__func__);
  return 0;
}
status_t EventFlag::waitHelper(uint32_t bitmask, uint32_t* efState,
                               int64_t timeoutNanoSeconds) {
  inc_func_call_count(__func__);
  return 0;
}
status_t EventFlag::wake(uint32_t bitmask) {
  inc_func_call_count(__func__);
  return 0;
}
void EventFlag::addNanosecondsToCurrentTime(int64_t nanoSeconds,
                                            struct timespec* waitTime) {
  inc_func_call_count(__func__);
}
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@ cc_defaults {
        ":TestMockCommon",
        ":TestMockFrameworks",
        ":TestMockHci",
        ":TestMockSystemLibfmq",
        ":TestMockUdrv",
        "adapter/bluetooth_test.cc",
    ],
@@ -55,6 +54,7 @@ cc_defaults {
        "libbinder_ndk",
        "libcrypto",
        "libcutils",
        "libfmq",
        "libhidlbase",
        "liblog",
        "libstatssocket",