blob: 594ab5d710bb0ceafce2754beffdb39339d28670 [file] [log] [blame]
# Copyright 2020 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")
import("//build/rust/rustc_test.gni")
group("policy") {
testonly = true
deps = [ ":policy-integration-tests" ]
}
fuchsia_component("none") {
testonly = true
manifest = "meta/none.cmx"
deps = [ "//src/sys/appmgr/integration_tests:echo_server" ]
}
components = [ ":none" ]
foreach(case,
[
"package_cache",
"package_resolver",
"root_job",
"cpu_resource",
"debug_resource",
"hypervisor_resource",
"info_resource",
"ioport_resource",
"irq_resource",
"mmio_resource",
"power_resource",
"smc_resource",
"root_resource",
"vmex_resource",
"deprecated_shell",
"pkgfs_versions",
"deprecated_ambient_replace_as_exec",
]) {
foreach(suffix,
[
"allowed",
"denied",
]) {
fuchsia_component("${case}_${suffix}") {
testonly = true
manifest = "meta/$case.cmx"
deps = [ "//src/sys/appmgr/integration_tests:echo_server" ]
}
components += [ ":${case}_${suffix}" ]
}
}
rustc_test("policy_test") {
name = "policy_integration_test"
source_root = "./policy_integration_test.rs"
edition = "2021"
deps = [
"//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc",
"//sdk/fidl/fuchsia.sys.internal:fuchsia.sys.internal-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/sys/appmgr/integration_tests/fidl:echo-rustc",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:lazy_static",
]
sources = [ "policy_integration_test.rs" ]
}
fuchsia_component("policy_integration_test") {
testonly = true
manifest = "meta/policy_integration_test.cmx"
deps = [ ":policy_test" ]
}
fuchsia_test_package("policy-integration-tests") {
test_components = [ ":policy_integration_test" ]
deps = components
}