blob: 2b1bff8f13b7c753ae261cef633025976b9a5746 [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_binary.gni")
rustc_binary("bin") {
testonly = true
name = "system_metrics_logger"
edition = "2021"
with_unit_tests = true
deps = [
"fuchsia.systemmetrics.test:fuchsia.systemmetrics.test_rust",
"//sdk/fidl/fuchsia.kernel:fuchsia.kernel_rust",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/trace/rust:trace",
"//src/lib/trace/rust:trace-provider",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:tracing",
]
test_deps = [
"//src/lib/fidl/rust/fidl",
"//third_party/rust_crates:assert_matches",
]
sources = [ "src/main.rs" ]
}
fuchsia_component("system-metrics-logger-component") {
testonly = true
deps = [ ":bin" ]
manifest = "meta/system-metrics-logger.cml"
}
fuchsia_package("system-metrics-logger") {
testonly = true
deps = [ ":system-metrics-logger-component" ]
}
fuchsia_component("system-metrics-logger-test-component") {
testonly = true
deps = [ ":bin_test" ]
component_name = "system-metrics-logger-tests"
manifest = "meta/system-metrics-logger-tests.cml"
}
fuchsia_test_package("system-metrics-logger-tests") {
test_components = [ ":system-metrics-logger-test-component" ]
deps = [ ":system-metrics-logger-component" ]
test_specs = {
environments = basic_envs
}
}
group("tests") {
testonly = true
deps = [ ":system-metrics-logger-tests" ]
}