Loading system/gd/Android.bp +81 −1 Original line number Diff line number Diff line Loading @@ -279,6 +279,87 @@ cc_binary { } } cc_test { name: "bluetooth_test_gd_unit", test_suites: ["device-tests"], defaults: [ "gd_defaults", "gd_clang_coverage_bin", ], host_supported: true, test_options: { unit_test: true, }, target: { linux: { srcs: [ ":BluetoothOsTestSources_linux_generic", ], }, host: { srcs: [ ":BluetoothHalTestSources_hci_host", ":BluetoothOsTestSources_host", ], }, android: { srcs: [ ":BluetoothHalTestSources_hci_android_hidl", ":BluetoothOsTestSources_android", ], shared_libs: [ "android.hardware.bluetooth@1.0", "android.hardware.bluetooth@1.1", "android.system.suspend.control-V1-ndk", "libbinder_ndk", "libhidlbase", "libutils", "libcutils", "libstatslog", ], }, }, srcs: [ "module_unittest.cc", "stack_manager_unittest.cc", ":BluetoothCommonTestSources", ":BluetoothCryptoToolboxTestSources", ":BluetoothDumpsysTestSources", ":BluetoothHalTestSources", ":BluetoothHciUnitTestSources", ":BluetoothL2capUnitTestSources", ":BluetoothPacketTestSources", ":BluetoothShimTestSources", ":BluetoothSecurityUnitTestSources", ":BluetoothStorageUnitTestSources", ], generated_headers: [ "BluetoothGeneratedBundlerSchema_h_bfbs", "BluetoothGeneratedDumpsysBundledSchema_h", "BluetoothGeneratedDumpsysBundledTestSchema_h", "BluetoothGeneratedDumpsysDataSchema_h", "BluetoothGeneratedDumpsysTestData_h", "BluetoothGeneratedPackets_h", ], static_libs: [ "libbluetooth-protos", "libbluetooth_gd", "libc++fs", "libflatbuffers-cpp", "libgmock", "libbluetooth_rust_interop", ], shared_libs: [ "libchrome", "libcrypto", "libgrpc++", "libgrpc_wrap", ], sanitize: { address: true, }, } cc_test { name: "bluetooth_test_gd", test_suites: ["device-tests"], Loading Loading @@ -333,7 +414,6 @@ cc_test { ":BluetoothNeighborTestSources", ":BluetoothPacketTestSources", ":BluetoothSecurityTestSources", ":BluetoothShimTestSources", ":BluetoothStorageTestSources", ], generated_headers: [ Loading system/gd/hci/Android.bp +11 −5 Original line number Diff line number Diff line Loading @@ -30,21 +30,27 @@ filegroup { } filegroup { name: "BluetoothHciTestSources", name: "BluetoothHciUnitTestSources", srcs: [ "acl_builder_test.cc", "acl_manager/round_robin_scheduler_test.cc", "acl_manager_test.cc", "address_unittest.cc", "address_with_type_test.cc", "class_of_device_unittest.cc", "hci_packets_test.cc", "uuid_unittest.cc", ], } filegroup { name: "BluetoothHciTestSources", srcs: [ "acl_manager/round_robin_scheduler_test.cc", "acl_manager_test.cc", "controller_test.cc", "hci_layer_test.cc", "hci_packets_test.cc", "le_address_manager_test.cc", "le_advertising_manager_test.cc", "le_scanning_manager_test.cc", "uuid_unittest.cc", ], } Loading system/gd/hci/le_scanning_manager_test.cc +4 −0 Original line number Diff line number Diff line Loading @@ -154,6 +154,7 @@ class TestHciLayer : public HciLayer { void CommandCompleteCallback(EventView event) { CommandCompleteView complete_view = CommandCompleteView::Create(event); ASSERT_TRUE(complete_view.IsValid()); ASSERT_NE(command_complete_callbacks.size(), 0); std::move(command_complete_callbacks.front()).Invoke(complete_view); command_complete_callbacks.pop_front(); } Loading @@ -161,6 +162,7 @@ class TestHciLayer : public HciLayer { void CommandStatusCallback(EventView event) { CommandStatusView status_view = CommandStatusView::Create(event); ASSERT_TRUE(status_view.IsValid()); ASSERT_NE(command_status_callbacks.size(), 0); std::move(command_status_callbacks.front()).Invoke(status_view); command_status_callbacks.pop_front(); } Loading Loading @@ -455,6 +457,8 @@ TEST_F(LeAndroidHciScanningManagerTest, scan_filter_add_test) { filters.push_back(filter); le_scanning_manager->ScanFilterAdd(0x01, filters); EXPECT_CALL(mock_callbacks_, OnFilterConfigCallback); auto result = next_command_future.wait_for(std::chrono::duration(std::chrono::milliseconds(100))); ASSERT_EQ(std::future_status::ready, result); test_hci_layer_->IncomingEvent( LeAdvFilterBroadcasterAddressCompleteBuilder::Create(uint8_t{1}, ErrorCode::SUCCESS, ApcfAction::ADD, 0x0a)); sync_client_handler(); Loading system/gd/l2cap/Android.bp +7 −1 Original line number Diff line number Diff line Loading @@ -69,11 +69,17 @@ filegroup { "internal/receiver_test.cc", "internal/scheduler_fifo_test.cc", "internal/sender_test.cc", "l2cap_packet_test.cc", "le/internal/dynamic_channel_service_manager_test.cc", "le/internal/fixed_channel_impl_test.cc", "le/internal/fixed_channel_service_manager_test.cc", "le/internal/link_manager_test.cc", ], } filegroup { name: "BluetoothL2capUnitTestSources", srcs: [ "l2cap_packet_test.cc", "signal_id_test.cc", ], } Loading system/gd/security/Android.bp +8 −2 Original line number Diff line number Diff line Loading @@ -28,11 +28,17 @@ filegroup { } filegroup { name: "BluetoothSecurityTestSources", name: "BluetoothSecurityUnitTestSources", srcs: [ "ecc/multipoint_test.cc", "pairing_handler_le_unittest.cc", "test/ecdh_keys_test.cc", ], } filegroup { name: "BluetoothSecurityTestSources", srcs: [ "pairing_handler_le_unittest.cc", "test/fake_l2cap_test.cc", "test/pairing_handler_le_pair_test.cc", ":BluetoothSecurityChannelTestSources", Loading Loading
system/gd/Android.bp +81 −1 Original line number Diff line number Diff line Loading @@ -279,6 +279,87 @@ cc_binary { } } cc_test { name: "bluetooth_test_gd_unit", test_suites: ["device-tests"], defaults: [ "gd_defaults", "gd_clang_coverage_bin", ], host_supported: true, test_options: { unit_test: true, }, target: { linux: { srcs: [ ":BluetoothOsTestSources_linux_generic", ], }, host: { srcs: [ ":BluetoothHalTestSources_hci_host", ":BluetoothOsTestSources_host", ], }, android: { srcs: [ ":BluetoothHalTestSources_hci_android_hidl", ":BluetoothOsTestSources_android", ], shared_libs: [ "android.hardware.bluetooth@1.0", "android.hardware.bluetooth@1.1", "android.system.suspend.control-V1-ndk", "libbinder_ndk", "libhidlbase", "libutils", "libcutils", "libstatslog", ], }, }, srcs: [ "module_unittest.cc", "stack_manager_unittest.cc", ":BluetoothCommonTestSources", ":BluetoothCryptoToolboxTestSources", ":BluetoothDumpsysTestSources", ":BluetoothHalTestSources", ":BluetoothHciUnitTestSources", ":BluetoothL2capUnitTestSources", ":BluetoothPacketTestSources", ":BluetoothShimTestSources", ":BluetoothSecurityUnitTestSources", ":BluetoothStorageUnitTestSources", ], generated_headers: [ "BluetoothGeneratedBundlerSchema_h_bfbs", "BluetoothGeneratedDumpsysBundledSchema_h", "BluetoothGeneratedDumpsysBundledTestSchema_h", "BluetoothGeneratedDumpsysDataSchema_h", "BluetoothGeneratedDumpsysTestData_h", "BluetoothGeneratedPackets_h", ], static_libs: [ "libbluetooth-protos", "libbluetooth_gd", "libc++fs", "libflatbuffers-cpp", "libgmock", "libbluetooth_rust_interop", ], shared_libs: [ "libchrome", "libcrypto", "libgrpc++", "libgrpc_wrap", ], sanitize: { address: true, }, } cc_test { name: "bluetooth_test_gd", test_suites: ["device-tests"], Loading Loading @@ -333,7 +414,6 @@ cc_test { ":BluetoothNeighborTestSources", ":BluetoothPacketTestSources", ":BluetoothSecurityTestSources", ":BluetoothShimTestSources", ":BluetoothStorageTestSources", ], generated_headers: [ Loading
system/gd/hci/Android.bp +11 −5 Original line number Diff line number Diff line Loading @@ -30,21 +30,27 @@ filegroup { } filegroup { name: "BluetoothHciTestSources", name: "BluetoothHciUnitTestSources", srcs: [ "acl_builder_test.cc", "acl_manager/round_robin_scheduler_test.cc", "acl_manager_test.cc", "address_unittest.cc", "address_with_type_test.cc", "class_of_device_unittest.cc", "hci_packets_test.cc", "uuid_unittest.cc", ], } filegroup { name: "BluetoothHciTestSources", srcs: [ "acl_manager/round_robin_scheduler_test.cc", "acl_manager_test.cc", "controller_test.cc", "hci_layer_test.cc", "hci_packets_test.cc", "le_address_manager_test.cc", "le_advertising_manager_test.cc", "le_scanning_manager_test.cc", "uuid_unittest.cc", ], } Loading
system/gd/hci/le_scanning_manager_test.cc +4 −0 Original line number Diff line number Diff line Loading @@ -154,6 +154,7 @@ class TestHciLayer : public HciLayer { void CommandCompleteCallback(EventView event) { CommandCompleteView complete_view = CommandCompleteView::Create(event); ASSERT_TRUE(complete_view.IsValid()); ASSERT_NE(command_complete_callbacks.size(), 0); std::move(command_complete_callbacks.front()).Invoke(complete_view); command_complete_callbacks.pop_front(); } Loading @@ -161,6 +162,7 @@ class TestHciLayer : public HciLayer { void CommandStatusCallback(EventView event) { CommandStatusView status_view = CommandStatusView::Create(event); ASSERT_TRUE(status_view.IsValid()); ASSERT_NE(command_status_callbacks.size(), 0); std::move(command_status_callbacks.front()).Invoke(status_view); command_status_callbacks.pop_front(); } Loading Loading @@ -455,6 +457,8 @@ TEST_F(LeAndroidHciScanningManagerTest, scan_filter_add_test) { filters.push_back(filter); le_scanning_manager->ScanFilterAdd(0x01, filters); EXPECT_CALL(mock_callbacks_, OnFilterConfigCallback); auto result = next_command_future.wait_for(std::chrono::duration(std::chrono::milliseconds(100))); ASSERT_EQ(std::future_status::ready, result); test_hci_layer_->IncomingEvent( LeAdvFilterBroadcasterAddressCompleteBuilder::Create(uint8_t{1}, ErrorCode::SUCCESS, ApcfAction::ADD, 0x0a)); sync_client_handler(); Loading
system/gd/l2cap/Android.bp +7 −1 Original line number Diff line number Diff line Loading @@ -69,11 +69,17 @@ filegroup { "internal/receiver_test.cc", "internal/scheduler_fifo_test.cc", "internal/sender_test.cc", "l2cap_packet_test.cc", "le/internal/dynamic_channel_service_manager_test.cc", "le/internal/fixed_channel_impl_test.cc", "le/internal/fixed_channel_service_manager_test.cc", "le/internal/link_manager_test.cc", ], } filegroup { name: "BluetoothL2capUnitTestSources", srcs: [ "l2cap_packet_test.cc", "signal_id_test.cc", ], } Loading
system/gd/security/Android.bp +8 −2 Original line number Diff line number Diff line Loading @@ -28,11 +28,17 @@ filegroup { } filegroup { name: "BluetoothSecurityTestSources", name: "BluetoothSecurityUnitTestSources", srcs: [ "ecc/multipoint_test.cc", "pairing_handler_le_unittest.cc", "test/ecdh_keys_test.cc", ], } filegroup { name: "BluetoothSecurityTestSources", srcs: [ "pairing_handler_le_unittest.cc", "test/fake_l2cap_test.cc", "test/pairing_handler_le_pair_test.cc", ":BluetoothSecurityChannelTestSources", Loading