blob: 1a212f27160b1ae7699b2f432bde321f6bcb9921 [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.
# This directory was based on fuchsia-mirror/src/sys/component_manager/tests/utc-time/
import("//build/component/config.gni")
import("//build/fidl/fidl.gni")
import("//build/rust/rustc_binary.gni")
import("//src/sys/build/components.gni")
group("integration") {
testonly = true
deps = [ ":tests" ]
}
group("tests") {
testonly = true
deps = [
":detect-integration-test",
"//src/sys/component_manager:component-manager",
]
}
rustc_test("integration_test_bin") {
source_root = "integration_test.rs"
name = "detect_integration_test"
deps = [
"//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics-rustc",
"//sdk/fidl/fuchsia.feedback:fuchsia.feedback-rustc",
"//sdk/fidl/fuchsia.logger:fuchsia.logger-rustc",
"//sdk/fidl/fuchsia.mem:fuchsia.mem-rustc",
"//src/diagnostics/lib/selectors",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/storage/vfs/rust:vfs",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/lib/zircon/rust:fuchsia-zircon-status",
"//src/sys/component_manager/testing:test_utils_lib",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:async-trait",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:log",
"//third_party/rust_crates:pin-utils",
"//third_party/rust_crates:thiserror",
]
sources = [
"fake_archive_accessor.rs",
"fake_archive_accessor/archivist_accessor.rs",
"fake_archive_accessor/archivist_server.rs",
"fake_crash_reporter.rs",
"fake_crash_reporting_product_register.rs",
"integration_test.rs",
"test_filing_enable.rs",
"test_snapshot_sanitizing.rs",
"test_snapshot_throttle.rs",
"test_trigger_truth.rs",
]
}
fuchsia_component("integration-test-component") {
testonly = true
manifest = "meta/integration-test.cmx"
deps = [ ":integration_test_bin" ]
}
fuchsia_component("detect-component") {
testonly = true
manifest = "meta/detect.cml"
deps = [ "//src/diagnostics/launcher:bin" ]
}
fuchsia_component("component-manager") {
deps = [ "//src/sys/component_manager:bin" ]
component_name = "component_manager"
manifest =
rebase_path("//src/sys/component_manager/meta/component_manager.cmx")
}
# Run with `fx test detect-integration-test`.
fuchsia_test_package("detect-integration-test") {
test_components = [ ":integration-test-component" ]
deps = [
":component-manager",
":detect-component",
]
}