blob: 0075f456da63d398fb4779b5590701d8f40f4886 [file] [log] [blame]
# Copyright 2018 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/config.gni")
import("//build/package.gni")
import("//build/rust/rustc_binary.gni")
import("//build/test/test_package.gni")
group("sessions") {
testonly = true
deps = [
":mediasession",
":mediasession_config",
":tests",
"//src/media/sessions/examples",
"//src/media/sessions/mediasession_cli_tool",
]
}
group("tests") {
testonly = true
deps = [ ":mediasession_tests" ]
}
rustc_binary("bin") {
name = "mediasession"
edition = "2018"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.math:fuchsia.math-rustc",
"//sdk/fidl/fuchsia.media:fuchsia.media-rustc",
"//sdk/fidl/fuchsia.media.audio:fuchsia.media.audio-rustc",
"//sdk/fidl/fuchsia.media.sessions2:fuchsia.media.sessions2-rustc",
"//sdk/fidl/fuchsia.mem:fuchsia.mem-rustc",
"//src/lib/async-utils",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fidl_table_validation",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/mpmc",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:crossbeam",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:log",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:thiserror",
]
test_deps = [
"//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics-rustc",
"//sdk/fidl/fuchsia.logger:fuchsia.logger-rustc",
"//src/lib/diagnostics/reader/rust",
"//third_party/rust_crates:futures-test",
"//third_party/rust_crates:matches",
]
sources = [
"src/id.rs",
"src/interrupter.rs",
"src/main.rs",
"src/proxies.rs",
"src/proxies/observer.rs",
"src/proxies/player.rs",
"src/services.rs",
"src/services/active_session.rs",
"src/services/discovery.rs",
"src/services/discovery/filter.rs",
"src/services/discovery/watcher.rs",
"src/services/publisher.rs",
"src/test.rs",
"src/test/integration.rs",
]
}
test_package("mediasession_tests") {
deps = [ ":bin_test" ]
tests = [
{
name = "mediasession_bin_test"
},
]
}
package("mediasession") {
deps = [ ":bin" ]
binaries = [
{
name = "mediasession"
},
]
meta = [
{
path = rebase_path("meta/mediasession.cmx")
dest = "mediasession.cmx"
},
]
}
config_data("mediasession_config") {
for_pkg = "sysmgr"
outputs = [ "mediasession.config" ]
sources = [ "service.config" ]
}