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

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

Add facade support for shim layer

Bug: 157647700
Test: atest --host bluetooth_test_gd
Tag: #gd-refactor

Change-Id: Ia7a7d734c7509cc56e9ddf9f3396e826b8a8afe4
parent c0d1b56a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -201,6 +201,7 @@ cc_binary {
        ":BluetoothFacade_l2cap_layer",
        ":BluetoothFacade_neighbor",
        ":BluetoothFacade_security_layer",
        ":BluetoothFacade_shim_layer",
    ],
    generated_headers: [
        "BluetoothFacadeGeneratedStub_h",
@@ -535,6 +536,7 @@ filegroup {
        "l2cap/classic/facade.proto",
        "l2cap/le/facade.proto",
        "security/facade.proto",
        "shim/facade/facade.proto",
    ],
}

@@ -577,6 +579,8 @@ genrule {
        "neighbor/facade/facade.pb.h",
        "security/facade.grpc.pb.h",
        "security/facade.pb.h",
        "shim/facade/facade.grpc.pb.h",
        "shim/facade/facade.pb.h",
    ],
}

@@ -619,6 +623,8 @@ genrule {
        "neighbor/facade/facade.pb.cc",
        "security/facade.grpc.pb.cc",
        "security/facade.pb.cc",
        "shim/facade/facade.grpc.pb.cc",
        "shim/facade/facade.pb.cc",
    ],
}

+1 −0
Original line number Diff line number Diff line
@@ -14,3 +14,4 @@ DualL2capTest
LeSecurityTest
L2capPerformanceTest
SecurityTest
ShimTest
+2 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ from l2cap.classic import facade_pb2_grpc as l2cap_facade_pb2_grpc
from l2cap.le import facade_pb2_grpc as l2cap_le_facade_pb2_grpc
from neighbor.facade import facade_pb2_grpc as neighbor_facade_pb2_grpc
from security import facade_pb2_grpc as security_facade_pb2_grpc
from shim.facade import facade_pb2_grpc as shim_facade_pb2_grpc

MOBLY_CONTROLLER_CONFIG_NAME = "GdDevice"
ACTS_CONTROLLER_REFERENCE_NAME = "gd_devices"
@@ -241,6 +242,7 @@ class GdDeviceBase(ABC):
            self.grpc_channel)
        self.neighbor = neighbor_facade_pb2_grpc.NeighborFacadeStub(self.grpc_channel)
        self.security = security_facade_pb2_grpc.SecurityModuleFacadeStub(self.grpc_channel)
        self.shim = shim_facade_pb2_grpc.ShimFacadeStub(self.grpc_channel)

    def get_crash_snippet_and_log_tail(self):
        if is_subprocess_alive(self.backing_process):
+2 −11
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
#include "security/facade.h"
#include "security/security_module.h"
#include "shim/dumpsys.h"
#include "shim/facade/facade.h"
#include "shim/l2cap.h"
#include "stack_manager.h"
#include "storage/storage_module.h"
@@ -113,18 +114,8 @@ class RootFacadeService : public ::bluetooth::facade::RootFacade::Service {
        modules.add<::bluetooth::hci::facade::LeScanningManagerFacadeModule>();
        break;
      case BluetoothModule::SHIM:
        modules.add<::bluetooth::neighbor::ConnectabilityModule>();
        modules.add<::bluetooth::neighbor::DiscoverabilityModule>();
        modules.add<::bluetooth::neighbor::InquiryModule>();
        modules.add<::bluetooth::neighbor::NameModule>();
        modules.add<::bluetooth::shim::Dumpsys>();
        modules.add<::bluetooth::shim::facade::ShimFacadeModule>();
        modules.add<::bluetooth::shim::L2cap>();
        modules.add<::bluetooth::neighbor::PageModule>();
        modules.add<::bluetooth::hci::HciLayer>();
        modules.add<::bluetooth::hci::LeAdvertisingManager>();
        modules.add<::bluetooth::hci::LeScanningManager>();
        modules.add<::bluetooth::security::SecurityModule>();
        modules.add<::bluetooth::storage::StorageModule>();
        break;
      default:
        return ::grpc::Status(::grpc::StatusCode::INVALID_ARGUMENT, "invalid module under test");
+6 −1
Original line number Diff line number Diff line
@@ -14,4 +14,9 @@ filegroup {
    ],
}

filegroup {
    name: "BluetoothFacade_shim_layer",
    srcs: [
        "facade/facade.cc",
    ],
}
Loading