| # 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. |
| |
| # [START build] |
| |
| import("//sdk/ctf/build/ctf.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":fuchsia-examples-rust-tests-package" ] |
| } |
| |
| group("ctf-tests") { |
| testonly = true |
| deps = [ ":fuchsia-examples-rust-tests_archive" ] |
| } |
| |
| rustc_test("bin") { |
| edition = "2021" |
| source_root = "src/main.rs" |
| sources = [ source_root ] |
| name = "ctf_fuchsia_examples_rust_test" |
| deps = [ |
| "//examples/fidl/fuchsia.examples:fuchsia.examples_rust", |
| "//sdk/ctf/tests/examples/fidl/fuchsia.examples/testing/fidl:test.example_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component", |
| "//src/testing/realm_client/rust", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:log", |
| ] |
| } |
| |
| fuchsia_component("test-suite") { |
| testonly = true |
| manifest = "meta/test-suite.cml" |
| deps = [ ":bin" ] |
| } |
| |
| ctf_fuchsia_package("fuchsia-examples-rust-tests") { |
| package_name = "fuchsia-examples-rust-tests" |
| testonly = true |
| deps = [ ":test-suite" ] |
| } |
| |
| fuchsia_test_component("test-root") { |
| testonly = true |
| manifest = "meta/test-root.cml" |
| test_type = "ctf" |
| } |
| |
| fuchsia_test_package("fuchsia-examples-rust-tests-package") { |
| test_components = [ ":test-root" ] |
| subpackages = [ |
| "//sdk/ctf/tests/examples/fidl/fuchsia.examples/testing/realm-factory:echo-realm-factory", |
| ":fuchsia-examples-rust-tests", |
| ] |
| subpackages += RUST_SUBPACKAGES |
| } |
| # [END build] |