| # 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/rust/rustc_binary.gni") |
| import("//build/rust/rustc_test.gni") |
| import("//build/test/test_package.gni") |
| import("//src/sys/build/components.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", |
| "mmio_resource", |
| "irq_resource", |
| "ioport_resource", |
| "smc_resource", |
| "debug_resource", |
| "hypervisor_resource", |
| "info_resource", |
| "root_resource", |
| "vmex_resource", |
| "deprecated_shell", |
| "pkgfs_versions", |
| ]) { |
| 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 = "2018" |
| |
| deps = [ |
| "//garnet/examples/fidl/services:echo-rustc", |
| "//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", |
| "//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 |
| } |