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

Commit 9560404c authored by Myles Watson's avatar Myles Watson Committed by Gerrit Code Review
Browse files

Merge "Use one hci_layer_ mock" into main

parents 5005eb1a 4ce6c730
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -216,7 +216,6 @@ const shim::legacy::acl_interface_t GetMockAclInterface() {
struct hci_packet_parser_t;
const hci_packet_parser_t* hci_packet_parser_get_interface() { return nullptr; }
struct hci_t;
const hci_t* hci_layer_get_interface() { return nullptr; }
struct packet_fragmenter_t;
const packet_fragmenter_t* packet_fragmenter_get_interface() { return nullptr; }

+8 −0
Original line number Diff line number Diff line
@@ -1336,12 +1336,17 @@ cc_test {
        "include",
        "test/common",
    ],
    generated_headers: [
        "BluetoothGeneratedDumpsysDataSchema_h",
    ],
    include_dirs: [
        "packages/modules/Bluetooth/system",
        "packages/modules/Bluetooth/system/gd",
    ],
    srcs: [
        ":TestCommonMockFunctions",
        ":TestCommonStackConfig",
        ":TestMockMainShim",
        "btm/btm_iso.cc",
        "test/btm_iso_test.cc",
        "test/common/mock_controller.cc",
@@ -1350,9 +1355,12 @@ cc_test {
    ],
    static_libs: [
        "libbluetooth-types",
        "libbluetooth_hci_pdl",
        "libbt-common",
        "libbt-platform-protos-lite",
        "libbt_shim_bridge",
        "libchrome",
        "libflatbuffers-cpp",
        "libgmock",
        "liblog",
        "libosi",
+0 −3
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@

#include "common/init_flags.h"
#include "hci/hci_layer_mock.h"
#include "hci/include/hci_layer.h"
#include "internal_include/bt_target.h"
#include "stack/btm/btm_dev.h"
#include "stack/btm/btm_int_types.h"
@@ -46,8 +45,6 @@ extern tBTM_CB btm_cb;

tL2C_CB l2cb;

const hci_t* hci_layer_get_interface() { return nullptr; }

const std::string kSmpOptions("mock smp options");
const std::string kBroadcastAudioConfigOptions(
    "mock broadcast audio config options");
+4 −1
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include "stack/include/bt_types.h"
#include "stack/include/hci_error_code.h"
#include "stack/include/hcidefs.h"
#include "test/mock/mock_main_shim_hci_layer.h"

using bluetooth::hci::IsoManager;
using testing::_;
@@ -85,7 +86,6 @@ static hci_t interface = {.set_data_cb = set_data_cb,
                          .transmit_command = transmit_command,
                          .transmit_downward = transmit_downward};

const hci_t* hci_layer_get_interface() { return &interface; }
}  // namespace bluetooth::shim

namespace {
@@ -139,6 +139,8 @@ class IsoManagerTest : public Test {
    bluetooth::shim::SetMockIsoInterface(&iso_interface_);
    hcic::SetMockHcicInterface(&hcic_interface_);
    controller::SetMockControllerInterface(&controller_interface_);
    bluetooth::shim::testing::hci_layer_set_interface(
        &bluetooth::shim::interface);

    big_callbacks_.reset(new MockBigCallbacks());
    cig_callbacks_.reset(new MockCigCallbacks());
@@ -163,6 +165,7 @@ class IsoManagerTest : public Test {
    bluetooth::shim::SetMockIsoInterface(nullptr);
    hcic::SetMockHcicInterface(nullptr);
    controller::SetMockControllerInterface(nullptr);
    bluetooth::shim::testing::hci_layer_set_interface(nullptr);
  }

  virtual void InitIsoManager() {
+0 −1
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@
#include "neighbor/inquiry.h"
#include "neighbor/page.h"
#include "os/handler.h"
#include "security/security_module.h"
#include "storage/storage_module.h"

namespace bluetooth {
Loading