blob: 917e8370bdd620c83b30b82bb321b22d7a668b2d [file] [log] [blame]
# Copyright 2017 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//src/connectivity/bluetooth/core/bt-host/build/bt_gtest_package.gni")
source_set("testing") {
testonly = true
sources = [
"controller_test.h",
"mock_controller.cc",
"mock_controller.h",
"test_packets.cc",
"test_packets.h",
]
deps = [ "//third_party/googletest:gtest" ]
public_deps = [
":fake_controller",
"//garnet/public/lib/gtest",
"//src/connectivity/bluetooth/core/bt-host/l2cap:testing",
]
}
source_set("tests") {
testonly = true
sources = [
"fake_dynamic_channel_unittest.cc",
"fake_l2cap_unittest.cc",
"fake_sdp_server_unittest.cc",
"fake_signaling_server_unittest.cc",
]
deps = [ ":testing" ]
}
bt_gtest_package("bt-host-testing-tests") {
deps = [ ":tests" ]
}
# Target that includes Fake HCI emulation support. This should NOT depend on
# gtest.
source_set("fake_controller") {
testonly = true
sources = [
"controller_test_double_base.cc",
"controller_test_double_base.h",
"fake_controller.cc",
"fake_controller.h",
"fake_dynamic_channel.cc",
"fake_dynamic_channel.h",
"fake_gatt_server.cc",
"fake_gatt_server.h",
"fake_l2cap.cc",
"fake_l2cap.h",
"fake_peer.cc",
"fake_peer.h",
"fake_sdp_server.cc",
"fake_sdp_server.h",
"fake_signaling_server.cc",
"fake_signaling_server.h",
]
public_deps = [
"//src/connectivity/bluetooth/core/bt-host/att:definitions",
"//src/connectivity/bluetooth/core/bt-host/common",
"//src/connectivity/bluetooth/core/bt-host/gatt:definitions",
"//src/connectivity/bluetooth/core/bt-host/l2cap:testing",
# TODO(armansito): Pull in just the hci:definitions target.
"//sdk/lib/fit",
"//src/connectivity/bluetooth/core/bt-host/hci",
"//src/connectivity/bluetooth/core/bt-host/l2cap:definitions",
"//src/connectivity/bluetooth/core/bt-host/sdp",
"//src/lib/files",
"//src/lib/fxl",
"//zircon/public/lib/async-cpp",
"//zircon/public/lib/fbl",
"//zircon/public/lib/zx",
"//zircon/system/ulib/async-default",
]
}
# Main entry point for host library unittests.
source_set("gtest_main") {
testonly = true
sources = [ "run_all_unittests.cc" ]
deps = [
"//src/connectivity/bluetooth/core/bt-host/common",
"//src/devices/lib/driver",
"//src/lib/fsl",
"//src/lib/fxl/test:test_settings",
]
public_deps = [ "//third_party/googletest:gtest" ]
}
source_set("fuzzing") {
testonly = true
sources = [ "peer_fuzzer.h" ]
deps = [ "//src/connectivity/bluetooth/core/bt-host/gap" ]
}
source_set("fuzztest_driver") {
testonly = true
sources = [ "fuzztest_driver.cc" ]
deps = [ "//src/connectivity/bluetooth/core/bt-host/common" ]
}