| # Copyright 2026 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. | |
| load("//build/bazel/platforms:constraints.bzl", "HOST_OS_CONSTRAINTS") | |
| load("//build/bazel/rules/host_tests:host_rustc_test.bzl", "host_rustc_test") | |
| load("//src/developer/ffx/build:ffx_plugin.bzl", "ffx_plugin") | |
| package(default_applicable_licenses = ["//:license"]) | |
| test_suite( | |
| name = "host_tests", | |
| target_compatible_with = HOST_OS_CONSTRAINTS, | |
| tests = [ | |
| ":ffx_audio_record_args_test", | |
| ":ffx_audio_record_test", | |
| ], | |
| visibility = ["//src/developer/ffx:__pkg__"], | |
| ) | |
| ffx_plugin( | |
| name = "ffx_audio_record", | |
| srcs = ["src/lib.rs"], | |
| args_deps = [ | |
| "//sdk/fidl/fuchsia.audio.controller:fuchsia.audio.controller_rust", | |
| "//sdk/fidl/fuchsia.media:fuchsia.media_rust", | |
| "//src/developer/ffx/core:lib", | |
| "//src/media/audio/lib/rust", | |
| "//third_party/rust_crates/vendor:anyhow", | |
| "//third_party/rust_crates/vendor:argh", | |
| ], | |
| args_srcs = ["src/args.rs"], | |
| edition = "2024", | |
| # Uncomment this line, to enable all lints during local development. | |
| # (GN: configs = [ "//build/config/rust/lints:clippy_warn_all" ]) | |
| # lint_config = "//build/config/rust/lints:clippy_warn_all", | |
| sdk_category = "not-yet-specified", | |
| version = "0.1.0", | |
| visibility = ["//src/developer/ffx/plugins/audio:__pkg__"], | |
| deps = [ | |
| "//sdk/fidl/fuchsia.audio.controller:fuchsia.audio.controller_rust_fdomain", | |
| "//sdk/fidl/fuchsia.media:fuchsia.media_rust_fdomain", | |
| "//src/developer/ffx/lib/fho:lib", | |
| "//src/developer/ffx/lib/target/holders:lib", | |
| "//src/developer/ffx/lib/writer:lib", | |
| "//src/developer/ffx/plugins/audio/common:ffx_audio_common", | |
| "//src/lib/fdomain/client", | |
| "//third_party/rust_crates/vendor:anyhow", | |
| "//third_party/rust_crates/vendor:blocking", | |
| "//third_party/rust_crates/vendor:futures", | |
| ], | |
| ) | |
| host_rustc_test( | |
| name = "ffx_audio_record_args_test", | |
| crate = ":ffx_audio_record_args", | |
| ) | |
| host_rustc_test( | |
| name = "ffx_audio_record_test", | |
| crate = ":ffx_audio_record", | |
| deps = [ | |
| "//src/developer/ffx/lib/writer:lib", | |
| "//src/lib/fdomain/local", | |
| "//src/lib/fuchsia", | |
| ], | |
| ) |