| # Copyright 2025 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_test.gni") |
| import("//src/tests/fidl/conformance_suite/gidl-conformance-suite.gni") |
| import("//tools/fidl/gidl/gidl.gni") |
| |
| conformance_test_source = "$target_gen_dir/src/conformance_test.rs" |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":fidl_rust_next_conformance_tests" ] |
| } |
| |
| gidl("generate_conformance_test") { |
| type = "conformance" |
| language = "rust_next" |
| inputs = conformance_suite_gidl_files |
| fidl = conformance_suite_fidl_target |
| output = conformance_test_source |
| } |
| |
| rustc_test("fidl_rust_next_conformance_tests_bin") { |
| testonly = true |
| output_name = "fidl_rust_next_conformance_tests" |
| edition = "2024" |
| source_root = conformance_test_source |
| deps = [ |
| "//sdk/rust/zx-status", |
| "//sdk/rust/zx-types", |
| "//src/lib/fidl/rust/gidl_util", |
| "//src/lib/fidl/rust_next/fidl_next", |
| "//src/tests/fidl/conformance_suite:conformance_fidl_rust_next", |
| "//third_party/rust_crates:assert_matches", |
| "//third_party/rust_crates:zerocopy", |
| ] |
| non_rust_deps = [ ":generate_conformance_test" ] |
| sources = [ conformance_test_source ] |
| } |
| |
| fuchsia_unittest_package("fidl_rust_next_conformance_tests") { |
| deps = [ ":fidl_rust_next_conformance_tests_bin" ] |
| } |