blob: f01340324bda561ac05f12b16a7bc789417ff050 [file] [log] [blame]
# 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"
configs += [ "//build/config/rust:bootfs" ]
deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/fidl/fuchsia.ldsvc:fuchsia.ldsvc_rust",
"//sdk/rust/zx",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/sys/lib/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:log",
"//third_party/rust_crates:thiserror",
]
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
visibility = [
":*",
"//bundles/assembly/*",
"//sdk/ctf/*",
"//src/sys/test_manager:*",
]
deps = [ ":lib_loader_runner_cache_cmp" ]
}
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
# TODO: https://fxbug.dev/400833576: Re-enable it in the profile variant
# after the issue is fixed.
if (!is_profile) {
deps = [ ":lib_loader_runner_cache_unit_tests" ]
}
}