blob: a2369aec2c63d21d06984e7fe9f955e4074b6a38 [file] [log] [blame]
# Copyright 2021 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("//build/components.gni")
import("//build/rust/rustc_test.gni")
rustc_test("tests_bin") {
edition = "2021"
output_name = "bt_hfp_audio_gateway_integration_tests"
source_root = "src/main.rs"
deps = [
"//sdk/fidl/fuchsia.bluetooth.bredr:fuchsia.bluetooth.bredr_rust",
"//sdk/fidl/fuchsia.bluetooth.hfp:fuchsia.bluetooth.hfp_rust",
"//sdk/fidl/fuchsia.bluetooth.internal.a2dp:fuchsia.bluetooth.internal.a2dp_rust",
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/fidl/fuchsia.media:fuchsia.media_rust",
"//src/connectivity/bluetooth/lib/fuchsia-audio-dai",
"//src/connectivity/bluetooth/lib/fuchsia-bluetooth",
"//src/connectivity/bluetooth/testing/mock-piconet-server:lib",
"//src/connectivity/bluetooth/testing/realmbuilder-mock-helpers",
"//src/connectivity/bluetooth/testing/test-call-manager",
"//src/connectivity/lib/at-commands",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component-test",
"//src/lib/testing/fixture",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:bitflags",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:tracing",
]
sources = [ "src/main.rs" ]
configs -= [ "//build/config/rust/lints:allow_unused_results" ]
}
fuchsia_test_component("bt_hfp_audio_gateway_integration_tests") {
manifest = "meta/bt-hfp-audio-gateway-integration-tests.cml"
deps = [ ":tests_bin" ]
}
fuchsia_test_package("bt-hfp-audio-gateway-integration-tests") {
test_components = [ ":bt_hfp_audio_gateway_integration_tests" ]
test_specs = {
# The max severity is set to ERROR due to the HFP component's ERROR log message
# when the Profile service is dropped. In some test runs, the Profile service
# goes away before the HFP component terminates, resulting in the log. This does not
# indicate a bug and is expected behavior.
log_settings = {
max_severity = "ERROR"
}
# The profile integration tests tend to flake if tests are run in parallel.
parallel = 1
}
deps = [
# The HFP component + the default configuration used by it.
"//src/connectivity/bluetooth/profiles/bt-hfp-audio-gateway:component",
"//src/connectivity/bluetooth/profiles/bt-hfp-audio-gateway:default_config_values",
# The RFCOMM component that is the intermediary for HFP and test driven peers.
"//src/connectivity/bluetooth/profiles/bt-rfcomm:component",
# The component mock for the `fuchsia.bluetooth.internal.a2dp.Controller` capability.
"//src/connectivity/bluetooth/testing/mock-a2dp-controller:mock-a2dp-controller",
# Mock Piconet Server
"//src/connectivity/bluetooth/testing/mock-piconet-server:component",
]
}
group("tests") {
testonly = true
deps = [ ":bt-hfp-audio-gateway-integration-tests" ]
}