blob: c42b1a6421d4f64cd6c8ebdcf4a7811920384c8c [file] [log] [blame] [edit]
# 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/rust/rustc_binary.gni")
group("tests") {
testonly = true
deps = [ ":role_rust_lib_test" ]
}
rustc_test("bin") {
edition = "2021"
name = "role_lib_test"
testonly = true
source_root = "src/main.rs"
sources = [ source_root ]
deps = [
"//sdk/lib/scheduler/rust",
"//sdk/rust/zx",
"//src/lib/fuchsia",
"//src/lib/fuchsia-runtime",
"//third_party/rust_crates:anyhow",
]
}
resource("config_files") {
testonly = true
sources = [ "config/lib_test.profiles" ]
outputs = [ "profiles/{{source_file_part}}" ]
}
fuchsia_component("role_lib_test") {
testonly = true
manifest = "meta/role_lib_test.cml"
deps = [ ":bin" ]
}
fuchsia_component("test_realm") {
testonly = true
manifest = "meta/test_realm.cml"
}
fuchsia_test_package("role_rust_lib_test") {
test_components = [ ":test_realm" ]
deps = [
":config_files",
":role_lib_test",
"//src/zircon/bin/role_manager/testing/fake:fake_role_manager",
]
}