blob: cc4b5055f739ecd6e9a50ecc24af153d2fb9323c [file] [log] [blame]
# Copyright 2020 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_a2dp_source_integration_tests"
source_root = "src/main.rs"
deps = [
"//sdk/fidl/fuchsia.bluetooth.bredr:fuchsia.bluetooth.bredr_rust",
"//sdk/fidl/fuchsia.mediacodec:fuchsia.mediacodec_rust",
"//sdk/fidl/fuchsia.metrics:fuchsia.metrics_rust",
"//sdk/fidl/fuchsia.sysmem2:fuchsia.sysmem2_rust",
"//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider_rust",
"//src/connectivity/bluetooth/lib/fuchsia-bluetooth",
"//src/connectivity/bluetooth/testing/mock-piconet-server:lib",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component-test",
"//src/lib/testing/fixture",
"//third_party/rust_crates:futures",
]
sources = [ "src/main.rs" ]
configs -= [ "//build/config/rust/lints:allow_unused_results" ]
}
fuchsia_test_component("bt-a2dp-source-integration-test-component") {
restricted_features = [ "allow_non_hermetic_packages" ]
manifest = "meta/bt-a2dp-source-integration-tests.cml"
deps = [ ":tests_bin" ]
test_type = "system"
}
fuchsia_test_package("bt-a2dp-source-integration-tests") {
test_components = [ ":bt-a2dp-source-integration-test-component" ]
# The max severity is set to ERROR due to the Cobalt connector ERROR message if the `Logger`
# capability is unavailable. This occurs in some cases when the `mock-cobalt` component exits
# (because the test has completed) before the A2DP component attempts to connect to it. This is
# not a bug in the test, and may be fixed if we enforce ordering in component shut down.
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
deps = [
# The v2 A2DP component with only Source mode enabled.
"//src/connectivity/bluetooth/profiles/bt-a2dp:component",
"//src/connectivity/bluetooth/profiles/bt-a2dp:source_only_config",
# Mock Piconet Server
"//src/connectivity/bluetooth/testing/mock-piconet-server:component",
# Mock cobalt component that provides Cobalt services to A2DP.
"//src/cobalt/bin/testing/mock_cobalt:component_v2",
]
}
group("tests") {
testonly = true
deps = [
":bt-a2dp-source-integration-tests",
# Codec Factory package with the CFv2 component providing the `fuchsia.mediacodec.CodecFactory`
# capability.
"//src/media/codec:codec_factory",
]
}