| # 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/components.gni") |
| import("//build/fidl/fidl.gni") |
| import("//build/rust/rustc_binary.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.io2:fuchsia.io2-rustc", |
| "//sdk/fidl/fuchsia.logger:fuchsia.logger-rustc", |
| "//sdk/fidl/fuchsia.mem:fuchsia.mem-rustc", |
| "//src/diagnostics/lib/selectors", |
| "//src/diagnostics/lib/testing/fake-archive-accessor", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-component-test", |
| "//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", |
| "//src/sys/lib/component-events", |
| "//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_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.cml" |
| 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", |
| ] |
| } |