| # Copyright 2019 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_test.gni") |
| |
| group("session_manager") { |
| testonly = true |
| deps = [ ":package" ] |
| } |
| |
| rustc_test("test") { |
| edition = "2021" |
| output_name = "session_manager_integration_test" |
| |
| source_root = "src/main.rs" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust", |
| "//sdk/fidl/fuchsia.hardware.suspend:fuchsia.hardware.suspend_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/fidl/fuchsia.power.broker:fuchsia.power.broker_rust", |
| "//sdk/fidl/fuchsia.power.suspend:fuchsia.power.suspend_rust", |
| "//sdk/fidl/fuchsia.power.system:fuchsia.power.system_rust", |
| "//sdk/fidl/fuchsia.session:fuchsia.session_rust", |
| "//sdk/fidl/fuchsia.session.power:fuchsia.session.power_rust", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust", |
| "//src/lib/diagnostics/hierarchy/rust", |
| "//src/lib/diagnostics/reader/rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-component-test", |
| "//src/power/system-activity-governor/integration/testing/fidl:test.systemactivitygovernor_rust", |
| "//src/power/testing/fake-suspend:test.suspendcontrol_rust", |
| "//src/session/bin/session_manager:lib", |
| "//src/sys/lib/cm_rust", |
| "//src/testing/realm_proxy/client", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| ] |
| |
| sources = [ "src/main.rs" ] |
| } |
| |
| fuchsia_component("component") { |
| testonly = true |
| component_name = "session-manager-integration-test" |
| manifest = "meta/session-manager-integration-test.cml" |
| deps = [ ":test" ] |
| } |
| |
| fuchsia_component("use-power-fidl") { |
| testonly = true |
| component_name = "use-power-fidl" |
| manifest = "meta/use-power-fidl.cml" |
| } |
| |
| fuchsia_test_package("package") { |
| package_name = "session-manager-integration-tests" |
| test_components = [ ":component" ] |
| subpackages = [ |
| "//src/session/examples/hello-world-session", |
| "//src/power/system-activity-governor/integration/testing/realm-factory", |
| ] |
| deps = [ |
| ":bogus_session_manager_test_config_values", |
| ":use-power-fidl", |
| "//src/session/bin/session_manager:session_manager_comp", |
| ] |
| } |
| |
| # TODO(https://fxbug.dev/42077036): Configuration gets specified using RealmBuilder, but |
| # we need to provide values in the package for reasons (see bug). Include some |
| # bogus defaults. |
| fuchsia_structured_config_values("bogus_session_manager_test_config_values") { |
| cm_label = "//src/session/bin/session_manager:manifest" |
| component_name = "session_manager" |
| values = { |
| session_url = "" |
| autolaunch = false |
| suspend_enabled = false |
| } |
| } |