| # Copyright 2022 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_binary.gni") | |
| rustc_binary("bin") { | |
| testonly = true | |
| name = "lib_loader_runner_cache" | |
| with_unit_tests = true | |
| edition = "2021" | |
| deps = [ | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", | |
| "//sdk/fidl/fuchsia.ldsvc:fuchsia.ldsvc_rust", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-async", | |
| "//src/lib/fuchsia-component", | |
| "//src/lib/zircon/rust:fuchsia-zircon", | |
| "//src/sys/lib/library_loader:library_loader", | |
| "//src/sys/test_runners/fidl/fuchsia.test.runner:fuchsia.test.runner_rust", | |
| "//third_party/rust_crates:anyhow", | |
| "//third_party/rust_crates:futures", | |
| "//third_party/rust_crates:thiserror", | |
| "//third_party/rust_crates:tracing", | |
| ] | |
| test_deps = [ | |
| "//src/lib/fuchsia-fs", | |
| "//third_party/rust_crates:assert_matches", | |
| ] | |
| sources = [ | |
| "src/loader_cache.rs", | |
| "src/main.rs", | |
| ] | |
| } | |
| fuchsia_component("lib_loader_runner_cache_cmp") { | |
| testonly = true | |
| manifest = "meta/lib_loader_runner_cache.cml" | |
| component_name = "lib_loader_runner_cache" | |
| deps = [ ":bin" ] | |
| } | |
| fuchsia_package("lib_loader_runner_cache") { | |
| testonly = true | |
| deps = [ ":lib_loader_runner_cache_cmp" ] | |
| } | |
| group("lib_loader_cache") { | |
| testonly = true | |
| deps = [ ":lib_loader_runner_cache" ] | |
| } | |
| fuchsia_unittest_package("lib_loader_runner_cache_unit_tests") { | |
| deps = [ | |
| ":bin_test", | |
| "//src/sys/lib/library_loader:config_test_bar_baz", | |
| "//src/sys/lib/library_loader:config_test_foo", | |
| ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":lib_loader_runner_cache_unit_tests" ] | |
| } |