blob: 8deb8970142c37ed3029751e45ebbb3461bd9f84 [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_library.gni")
# Integration test binary for Diagnostics Persistence service.
rustc_test("integration-bin") {
edition = "2021"
testonly = true
name = "persistence_integration_test"
deps = [
"//sdk/fidl/fuchsia.component:fuchsia.component_rust",
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//src/diagnostics/persistence/fidl:persist_rust",
"//src/diagnostics/sampler/tests/fidl:fuchsia.samplertestcontroller_rust",
"//src/lib/diagnostics/reader/rust",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-component-test",
"//src/lib/fuchsia-fs",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/storage/lib/vfs/rust:vfs",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:lazy_static",
"//third_party/rust_crates:regex",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:tracing",
]
source_root = "lib.rs"
sources = [
"lib.rs",
"mock_filesystems.rs",
"test_topology.rs",
]
inputs = [ "test_data/config/test_config.persist" ]
}
fuchsia_unittest_component("persistence-integration-test") {
manifest = "meta/integration-test.cml"
deps = [ ":integration-bin" ]
}
fuchsia_structured_config_values("persistence-test-config") {
values_source = "config/integration-test-persistence.json5"
component_name = "persistence"
cm_label = ":persistence-manifest-for-test"
}
# Rules defining the Persistence component.
fuchsia_component_manifest("persistence-manifest-for-test") {
component_name = "persistence"
manifest = "meta/persistence-for-test.cml"
}
fuchsia_component("persistence-component-for-test") {
cm_label = ":persistence-manifest-for-test"
deps = [ "//src/diagnostics/launcher:bin" ]
}
fuchsia_test_package("persistence-integration-tests") {
test_components = [
# TODO before submitting: ":config-validation-test",
":persistence-integration-test",
]
deps = [
":persistence-component-for-test",
":persistence-test-config",
"//src/diagnostics/sampler/tests/test_component:single_counter_test_component",
]
}
group("tests") {
testonly = true
deps = [ ":persistence-integration-tests" ]
}