|  | # Copyright 2024 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_binary.gni") | 
|  |  | 
|  | group("tests") { | 
|  | testonly = true | 
|  | deps = [ ":sensor-manager-integration-tests" ] | 
|  | } | 
|  |  | 
|  | rustc_test("test") { | 
|  | edition = "2021" | 
|  | output_name = "sensor_manager_integration_tests" | 
|  |  | 
|  | source_root = "src/main.rs" | 
|  | sources = [ "src/main.rs" ] | 
|  |  | 
|  | test_deps = [ | 
|  | "//sdk/fidl/fuchsia.hardware.sensors:fuchsia.hardware.sensors_rust", | 
|  | "//sdk/fidl/fuchsia.sensors:fuchsia.sensors_rust", | 
|  | "//sdk/fidl/fuchsia.sensors.types:fuchsia.sensors.types_rust", | 
|  | "//src/lib/fidl/rust/fidl", | 
|  | "//src/lib/fuchsia", | 
|  | "//src/lib/fuchsia-async", | 
|  | "//src/lib/fuchsia-component", | 
|  | "//src/sensors/tests/testing/realm-factory/fidl:fuchsia.sensors.realm_rust", | 
|  | "//src/testing/realm_client/rust", | 
|  | "//third_party/rust_crates:anyhow", | 
|  | "//third_party/rust_crates:futures-util", | 
|  | ] | 
|  | } | 
|  |  | 
|  | fuchsia_component("component") { | 
|  | testonly = true | 
|  | component_name = "test-driver" | 
|  | manifest = "meta/test_driver.cml" | 
|  | deps = [ ":test" ] | 
|  | } | 
|  |  | 
|  | fuchsia_package("test-driver") { | 
|  | package_name = "test-driver" | 
|  | testonly = true | 
|  | deps = [ ":component" ] | 
|  | } | 
|  |  | 
|  | fuchsia_test_component("test-root") { | 
|  | testonly = true | 
|  | component_name = "sensor-manager-integration-tests" | 
|  | manifest = "meta/test_root.cml" | 
|  | } | 
|  |  | 
|  | fuchsia_test_package("sensor-manager-integration-tests") { | 
|  | test_components = [ ":test-root" ] | 
|  | subpackages = [ | 
|  | "//src/sensors/tests/testing/realm-factory:sensors-realm-factory", | 
|  | ":test-driver", | 
|  | ] | 
|  | test_specs = { | 
|  | # The test misconfigure playback to clear the configuration, which emits | 
|  | # an error log. | 
|  | log_settings = { | 
|  | max_severity = "ERROR" | 
|  | } | 
|  | } | 
|  | } |