| # Copyright 2021 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") |
| import("//src/tests/fidl/conformance_suite/gidl-conformance-suite.gni") |
| import("//tools/fidl/gidl/gidl.gni") |
| |
| group("rust") { |
| public_deps = [ ":dynfidl" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":fidl_dynfidl_conformance_tests" ] |
| } |
| |
| rustc_library("dynfidl") { |
| edition = "2021" |
| sources = [ "src/lib.rs" ] |
| } |
| |
| conformance_test_source = "$target_gen_dir/src/conformance_test.rs" |
| |
| gidl("generate_conformance_test") { |
| type = "conformance" |
| language = "dynfidl" |
| inputs = conformance_suite_gidl_files |
| fidl = conformance_suite_fidl_target |
| output = conformance_test_source |
| } |
| |
| rustc_test("fidl_dynfidl_conformance_tests_bin") { |
| output_name = "fidl_dynfidl_conformance_tests" |
| edition = "2018" |
| source_root = conformance_test_source |
| deps = [ ":dynfidl" ] |
| non_rust_deps = [ ":generate_conformance_test" ] |
| sources = [ conformance_test_source ] |
| } |
| |
| fuchsia_unittest_package("fidl_dynfidl_conformance_tests") { |
| deps = [ ":fidl_dynfidl_conformance_tests_bin" ] |
| } |