| # 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_library.gni") |
| import("//build/rust/rustc_test.gni") |
| |
| rustc_library("sandbox") { |
| edition = "2024" |
| deps = [ |
| "//sdk/fidl/fuchsia.component.sandbox:fuchsia.component.sandbox_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/rust/zx", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-component", |
| "//third_party/rust_crates:thiserror", |
| ] |
| sources = [ "src/lib.rs" ] |
| } |
| |
| # Avoid test name collision by defining unit tests manually. Setting output_name |
| # on the rustc_library does not work. |
| rustc_test("component_sandbox_test") { |
| edition = "2024" |
| source_root = "src/lib.rs" |
| deps = [ |
| "//sdk/fidl/fuchsia.component.sandbox:fuchsia.component.sandbox_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/rust/zx", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//third_party/rust_crates:assert_matches", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:test-case", |
| "//third_party/rust_crates:thiserror", |
| ] |
| sources = [ "src/lib.rs" ] |
| } |
| |
| fuchsia_unittest_package("component-sandbox-test") { |
| deps = [ ":component_sandbox_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":component-sandbox-test" ] |
| } |