Loading system/gd/cert/cert_testcases_facade_only +1 −0 Original line number Diff line number Diff line Loading @@ -8,3 +8,4 @@ NeighborTest ControllerTest AclManagerTest LeAclManagerTest StackTest system/gd/facade/grpc_root_server.cc +28 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,19 @@ #include "os/log.h" #include "os/thread.h" #include "security/facade.h" #include "shim/advertising.h" #include "shim/connectability.h" #include "shim/controller.h" #include "shim/discoverability.h" #include "shim/dumpsys.h" #include "shim/hci_layer.h" #include "shim/inquiry.h" #include "shim/l2cap.h" #include "shim/name.h" #include "shim/page.h" #include "shim/scanning.h" #include "shim/security.h" #include "shim/storage.h" #include "stack_manager.h" namespace bluetooth { Loading Loading @@ -84,6 +97,21 @@ class RootFacadeService : public ::bluetooth::facade::RootFacade::Service { modules.add<::bluetooth::facade::ReadOnlyPropertyServerModule>(); modules.add<::bluetooth::security::SecurityModuleFacadeModule>(); break; case BluetoothModule::SHIM: modules.add<::bluetooth::shim::Advertising>(); modules.add<::bluetooth::shim::Connectability>(); modules.add<::bluetooth::shim::Controller>(); modules.add<::bluetooth::shim::Discoverability>(); modules.add<::bluetooth::shim::Dumpsys>(); modules.add<::bluetooth::shim::HciLayer>(); modules.add<::bluetooth::shim::Inquiry>(); modules.add<::bluetooth::shim::L2cap>(); modules.add<::bluetooth::shim::Name>(); modules.add<::bluetooth::shim::Page>(); modules.add<::bluetooth::shim::Scanning>(); modules.add<::bluetooth::shim::Security>(); modules.add<::bluetooth::shim::Storage>(); break; default: return ::grpc::Status(::grpc::StatusCode::INVALID_ARGUMENT, "invalid module under test"); } Loading system/gd/facade/rootservice.proto +1 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ enum BluetoothModule { HCI_INTERFACES = 2; L2CAP = 3; SECURITY = 4; SHIM = 5; } message StartStackRequest { Loading system/gd/shim/cert/stack_test.py 0 → 100644 +47 −0 Original line number Diff line number Diff line #!/usr/bin/env python3 # # Copyright 2020 - 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. from __future__ import print_function import os import sys sys.path.append(os.environ['ANDROID_BUILD_TOP'] + '/packages/modules/Bluetooth/system/gd') from cert.gd_base_test_facade_only import GdFacadeOnlyBaseTestClass from google.protobuf import empty_pb2 as empty_proto from facade import rootservice_pb2 as facade_rootservice from hci.facade import controller_facade_pb2 as controller_facade class StackTest(GdFacadeOnlyBaseTestClass): def setup_test(self): self.device_under_test = self.gd_devices[1] self.device_under_test.rootservice.StartStack( facade_rootservice.StartStackRequest( module_under_test=facade_rootservice.BluetoothModule.Value( 'SHIM'),)) self.device_under_test.wait_channel_ready() def teardown_test(self): self.device_under_test.rootservice.StopStack( facade_rootservice.StopStackRequest()) def test_test(self): return True system/gd/shim/stack.cc +2 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ #include "shim/security.h" #include "shim/storage.h" #include "stack_manager.h" #include "storage/legacy.h" using ::bluetooth::os::Thread; Loading Loading @@ -74,6 +75,7 @@ struct bluetooth::shim::Stack::impl { modules.add<::bluetooth::shim::Controller>(); modules.add<::bluetooth::shim::HciLayer>(); modules.add<::bluetooth::security::SecurityModule>(); modules.add<::bluetooth::storage::LegacyModule>(); modules.add<::bluetooth::shim::Advertising>(); modules.add<::bluetooth::shim::Connectability>(); modules.add<::bluetooth::shim::Discoverability>(); Loading Loading
system/gd/cert/cert_testcases_facade_only +1 −0 Original line number Diff line number Diff line Loading @@ -8,3 +8,4 @@ NeighborTest ControllerTest AclManagerTest LeAclManagerTest StackTest
system/gd/facade/grpc_root_server.cc +28 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,19 @@ #include "os/log.h" #include "os/thread.h" #include "security/facade.h" #include "shim/advertising.h" #include "shim/connectability.h" #include "shim/controller.h" #include "shim/discoverability.h" #include "shim/dumpsys.h" #include "shim/hci_layer.h" #include "shim/inquiry.h" #include "shim/l2cap.h" #include "shim/name.h" #include "shim/page.h" #include "shim/scanning.h" #include "shim/security.h" #include "shim/storage.h" #include "stack_manager.h" namespace bluetooth { Loading Loading @@ -84,6 +97,21 @@ class RootFacadeService : public ::bluetooth::facade::RootFacade::Service { modules.add<::bluetooth::facade::ReadOnlyPropertyServerModule>(); modules.add<::bluetooth::security::SecurityModuleFacadeModule>(); break; case BluetoothModule::SHIM: modules.add<::bluetooth::shim::Advertising>(); modules.add<::bluetooth::shim::Connectability>(); modules.add<::bluetooth::shim::Controller>(); modules.add<::bluetooth::shim::Discoverability>(); modules.add<::bluetooth::shim::Dumpsys>(); modules.add<::bluetooth::shim::HciLayer>(); modules.add<::bluetooth::shim::Inquiry>(); modules.add<::bluetooth::shim::L2cap>(); modules.add<::bluetooth::shim::Name>(); modules.add<::bluetooth::shim::Page>(); modules.add<::bluetooth::shim::Scanning>(); modules.add<::bluetooth::shim::Security>(); modules.add<::bluetooth::shim::Storage>(); break; default: return ::grpc::Status(::grpc::StatusCode::INVALID_ARGUMENT, "invalid module under test"); } Loading
system/gd/facade/rootservice.proto +1 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ enum BluetoothModule { HCI_INTERFACES = 2; L2CAP = 3; SECURITY = 4; SHIM = 5; } message StartStackRequest { Loading
system/gd/shim/cert/stack_test.py 0 → 100644 +47 −0 Original line number Diff line number Diff line #!/usr/bin/env python3 # # Copyright 2020 - 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. from __future__ import print_function import os import sys sys.path.append(os.environ['ANDROID_BUILD_TOP'] + '/packages/modules/Bluetooth/system/gd') from cert.gd_base_test_facade_only import GdFacadeOnlyBaseTestClass from google.protobuf import empty_pb2 as empty_proto from facade import rootservice_pb2 as facade_rootservice from hci.facade import controller_facade_pb2 as controller_facade class StackTest(GdFacadeOnlyBaseTestClass): def setup_test(self): self.device_under_test = self.gd_devices[1] self.device_under_test.rootservice.StartStack( facade_rootservice.StartStackRequest( module_under_test=facade_rootservice.BluetoothModule.Value( 'SHIM'),)) self.device_under_test.wait_channel_ready() def teardown_test(self): self.device_under_test.rootservice.StopStack( facade_rootservice.StopStackRequest()) def test_test(self): return True
system/gd/shim/stack.cc +2 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ #include "shim/security.h" #include "shim/storage.h" #include "stack_manager.h" #include "storage/legacy.h" using ::bluetooth::os::Thread; Loading Loading @@ -74,6 +75,7 @@ struct bluetooth::shim::Stack::impl { modules.add<::bluetooth::shim::Controller>(); modules.add<::bluetooth::shim::HciLayer>(); modules.add<::bluetooth::security::SecurityModule>(); modules.add<::bluetooth::storage::LegacyModule>(); modules.add<::bluetooth::shim::Advertising>(); modules.add<::bluetooth::shim::Connectability>(); modules.add<::bluetooth::shim::Discoverability>(); Loading