blob: 4380d1b4277ebcd9023b2c0b7ed5443a9ad44fe5 [file] [log] [blame] [edit]
# 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_test.gni")
import("//src/sys/build/components.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"
gidl("generate_conformance_test") {
type = "conformance"
language = "rust"
inputs = conformance_suite_gidl_files
fidl = conformance_suite_fidl_target
output = conformance_test_source
testonly = true
}
rustc_test("fidl_rust_conformance_tests_bin") {
output_name = "fidl_rust_conformance_tests"
edition = "2018"
source_root = conformance_test_source
deps = [
"//src/lib/fidl/rust/fidl",
"//src/lib/fidl/rust/gidl_util",
"//src/lib/zircon/rust:fuchsia-zircon-status",
"//src/tests/fidl/conformance_suite:conformance_fidl-rustc",
"//third_party/rust_crates:matches",
]
non_rust_deps = [ ":generate_conformance_test" ]
sources = [ conformance_test_source ]
}
fuchsia_unittest_component("fidl_rust_conformance_tests") {
executable_path = "bin/fidl_rust_conformance_tests"
deps = [ ":fidl_rust_conformance_tests_bin" ]
}
fuchsia_unittest_component("fidl_rust_external_tests") {
executable_path = "bin/fidl_rust_external_tests"
deps = [ "external_tests:fidl_rust_external_tests" ]
}
fuchsia_unittest_component("fidl_rust_lib_tests") {
executable_path = "bin/fidl_rust_lib_tests"
deps = [ "fidl:fidl_rust_lib_tests" ]
}
fuchsia_unittest_component("fidl_rust_handle_tests") {
executable_path = "bin/fidl_rust_handle_tests"
deps = [ "handle_tests:fidl_rust_handle_tests" ]
}
fuchsia_test_package("fidl-rust-tests") {
test_components = [
":fidl_rust_conformance_tests",
":fidl_rust_external_tests",
":fidl_rust_lib_tests",
":fidl_rust_handle_tests",
]
}
group("tests") {
testonly = true
deps = [
":fidl-rust-tests",
":fidl_rust_conformance_tests_bin($host_toolchain)",
"compilation_tests:tests",
"fidl:fidl_rust_lib_tests($host_toolchain)",
"handle_tests:fidl_rust_handle_tests($host_toolchain)",
]
}