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

Commit 6dec5b45 authored by Martin Brabham's avatar Martin Brabham
Browse files

SecurityModule: Setup devices

Bug: 144742237
Test: ./cert/run_cert_facade_only.sh
Change-Id: I282b9cfd9c0155eb938a3bcb09a0b4f9e19397cd
parent 286dfb0c
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -26,7 +26,9 @@ from cert.gd_base_test_facade_only import GdFacadeOnlyBaseTestClass
from cert.event_callback_stream import EventCallbackStream
from cert.event_asserts import EventAsserts
from google.protobuf import empty_pb2
from facade import common_pb2
from facade import rootservice_pb2 as facade_rootservice_pb2
from google.protobuf import empty_pb2
from security import facade_pb2 as security_facade_pb2
from l2cap.classic import facade_pb2 as l2cap_facade_pb2
from bluetooth_packets_python3 import hci_packets
@@ -47,6 +49,24 @@ class SimpleSecurityTest(GdFacadeOnlyBaseTestClass):
                module_under_test=facade_rootservice_pb2.BluetoothModule.Value(
                    'L2CAP'),))

        self.device_under_test.address = self.device_under_test.controller_read_only_property.ReadLocalAddress(
            empty_pb2.Empty()).address
        self.cert_device.address = self.cert_device.controller_read_only_property.ReadLocalAddress(
            empty_pb2.Empty()).address

        self.dut_address = common_pb2.BluetoothAddress(
            address=self.device_under_test.address)
        self.cert_address = common_pb2.BluetoothAddress(
            address=self.cert_device.address)

        self.dut_address_with_type = common_pb2.BluetoothAddressWithType()
        self.dut_address_with_type.address.CopyFrom(self.dut_address)
        self.dut_address_with_type.type = common_pb2.BluetoothPeerAddressTypeEnum.PUBLIC_DEVICE_OR_IDENTITY_ADDRESS

        self.cert_address_with_type = common_pb2.BluetoothAddressWithType()
        self.cert_address_with_type.address.CopyFrom(self.cert_address)
        self.cert_address_with_type.type = common_pb2.BluetoothPeerAddressTypeEnum.PUBLIC_DEVICE_OR_IDENTITY_ADDRESS

        self.device_under_test.wait_channel_ready()
        self.cert_device.wait_channel_ready()