| # 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/fidl/fidl.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//build/rust/rustc_test.gni") |
| import("//build/testing/environments.gni") |
| |
| group("timekeeper_integration") { |
| testonly = true |
| deps = [ |
| ":timekeeper-integration", |
| "//src/cobalt/bin/testing/mock_cobalt", |
| ] |
| } |
| |
| rustc_library("timekeeper_integration_lib") { |
| testonly = true |
| name = "timekeeper_integration_lib" |
| edition = "2021" |
| |
| sources = [ "tests/lib/lib.rs" ] |
| |
| source_root = "tests/lib/lib.rs" |
| |
| deps = [ |
| ":test.time-rustc", |
| "//sdk/fidl/fuchsia.cobalt:fuchsia.cobalt-rustc", |
| "//sdk/fidl/fuchsia.cobalt.test:fuchsia.cobalt.test-rustc", |
| "//sdk/fidl/fuchsia.hardware.rtc:fuchsia.hardware.rtc-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.logger:fuchsia.logger-rustc", |
| "//sdk/fidl/fuchsia.time:fuchsia.time-rustc", |
| "//sdk/fidl/fuchsia.time.external:fuchsia.time.external-rustc", |
| "//src/lib/async-utils", |
| "//src/lib/fake-clock/fidl:fidl-rustc", |
| "//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/zircon/rust:fuchsia-zircon", |
| "//src/sys/time/lib/push-source", |
| "//src/sys/time/lib/time_metrics_registry", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:chrono", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:tracing", |
| ] |
| } |
| |
| rustc_test("integration_test_bin") { |
| name = "timekeeper_integration_test" |
| edition = "2021" |
| |
| sources = [ "tests/timekeeper/integration.rs" ] |
| |
| source_root = "tests/timekeeper/integration.rs" |
| |
| deps = [ |
| ":timekeeper_integration_lib", |
| "//sdk/fidl/fuchsia.cobalt:fuchsia.cobalt-rustc", |
| "//sdk/fidl/fuchsia.cobalt.test:fuchsia.cobalt.test-rustc", |
| "//sdk/fidl/fuchsia.time.external:fuchsia.time.external-rustc", |
| "//src/lib/cobalt/rust:fuchsia-cobalt", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/test_util", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/time/lib/time_metrics_registry", |
| "//third_party/rust_crates:futures", |
| ] |
| } |
| |
| rustc_test("faketime_integration_test_bin") { |
| name = "faketime_integration_test" |
| edition = "2021" |
| |
| sources = [ "tests/faketime/integration.rs" ] |
| |
| source_root = "tests/faketime/integration.rs" |
| |
| deps = [ |
| ":timekeeper_integration_lib", |
| "//sdk/fidl/fuchsia.cobalt:fuchsia.cobalt-rustc", |
| "//sdk/fidl/fuchsia.cobalt.test:fuchsia.cobalt.test-rustc", |
| "//sdk/fidl/fuchsia.time.external:fuchsia.time.external-rustc", |
| "//src/lib/cobalt/rust:fuchsia-cobalt", |
| "//src/lib/fake-clock/fidl:fidl-rustc", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/test_util", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/time/lib/time_metrics_registry", |
| "//third_party/rust_crates:futures", |
| ] |
| } |
| |
| fuchsia_component("timekeeper_integration_test") { |
| testonly = true |
| component_name = "timekeeper_integration_test" |
| manifest = "meta/timekeeper_integration_test.cml" |
| deps = [ ":integration_test_bin" ] |
| } |
| |
| fuchsia_component("faketime_integration_test") { |
| testonly = true |
| component_name = "faketime_integration_test" |
| manifest = "meta/faketime_integration_test.cml" |
| deps = [ ":faketime_integration_test_bin" ] |
| } |
| |
| fuchsia_component("timekeeper_for_integration") { |
| testonly = true |
| component_name = "timekeeper_for_integration" |
| manifest = "meta/timekeeper_for_integration.cmx" |
| deps = [ "//src/sys/time/timekeeper:bin" ] |
| } |
| |
| fuchsia_component("timekeeper_with_fake_time") { |
| testonly = true |
| component_name = "timekeeper_with_fake_time" |
| manifest = "meta/timekeeper_with_fake_time.cmx" |
| deps = [ "//src/sys/time/timekeeper:bin_with_fake_time" ] |
| } |
| |
| fidl("test.time") { |
| testonly = true |
| sources = [ "fidl/test.fidl" ] |
| public_deps = [ "//sdk/fidl/fuchsia.time.external" ] |
| } |
| |
| fuchsia_test_package("timekeeper-integration") { |
| test_components = [ |
| ":faketime_integration_test", |
| ":timekeeper_integration_test", |
| ] |
| deps = [ |
| ":timekeeper_for_integration", |
| ":timekeeper_with_fake_time", |
| "dev_time_source", |
| "//src/cobalt/bin/testing/mock_cobalt:component_v2", |
| "//src/diagnostics/archivist:archivist-for-embedding-v2", |
| "//src/lib/fake-clock/svc", |
| ] |
| |
| test_specs = { |
| environments = [ nuc_env ] |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |