blob: 860cc425df9438a46796c4097949816b9fc6fdf8 [file]
# 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/fidl/fidl.gni")
import("//build/test.gni")
import("//src/tests/fidl/conformance_suite/gidl-conformance-suite.gni")
import("//tools/fidl/gidl/gidl.gni")
group("conformance") {
testonly = true
deps = [
":fidl_llcpp_conformance_tests",
":fidl_llcpp_conformance_tests_bin($host_toolchain)",
":fidl_llcpp_manual_conformance_tests",
":fidl_llcpp_request_response_tests",
":fidl_llcpp_request_response_tests_bin($host_toolchain)",
]
}
gidl_output_prefix = "conformance_suite__"
gidl_deps = []
foreach(gidl_file, conformance_suite_gidl_files) {
gidl_name = get_path_info(gidl_file, "name")
target = "${gidl_output_prefix}${gidl_name}"
gidl_deps += [ ":" + target ]
gidl_llcpp_conformance(target) {
testonly = true
inputs = [ gidl_file ]
fidl = conformance_suite_fidl_target
deps = [
":conformance_utils",
"//third_party/googletest:gtest",
]
if (is_fuchsia) {
deps += [ "//sdk/cts/tests/pkg/fidl/cpp:handle_util" ]
}
}
}
test("fidl_llcpp_conformance_tests_bin") {
output_name = "fidl_llcpp_conformance_tests"
deps = [
":conformance_utils",
"//src/lib/fxl/test:gtest_main",
"//src/tests/fidl/conformance_suite:conformance_fidl_llcpp",
"//third_party/googletest:gtest",
] + gidl_deps
}
fuchsia_unittest_package("fidl_llcpp_conformance_tests") {
deps = [ ":fidl_llcpp_conformance_tests_bin" ]
deprecated_legacy_test_execution = true
}
fidl("manual.conformance.large") {
testonly = true
visibility = [ ":*" ]
sources = [ "large.test.fidl" ]
}
# TODO(fxbug.dev/71459): This test is Fuchsia only because the FIDL library
# cannot compile on host.
test("fidl_llcpp_manual_conformance_tests_bin") {
output_name = "fidl_llcpp_manual_conformance_tests"
sources = [ "manual_conformance_test.cc" ]
deps = [
":manual.conformance.large_llcpp",
"//sdk/testing/fidl:fidl_test_llcpp",
"//src/lib/fidl/llcpp/tests/conformance:conformance_utils",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gtest",
]
}
fuchsia_unittest_package("fidl_llcpp_manual_conformance_tests") {
deps = [ ":fidl_llcpp_manual_conformance_tests_bin" ]
deprecated_legacy_test_execution = true
}
test("fidl_llcpp_request_response_tests_bin") {
sources = [ "request_response_test.cc" ]
deps = [
"//src/lib/fidl/llcpp/tests/wire_types:fidl.llcpp.types.test_llcpp",
"//src/lib/fxl/test:gtest_main",
]
# TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
fuchsia_unittest_package("fidl_llcpp_request_response_tests") {
deps = [ ":fidl_llcpp_request_response_tests_bin" ]
deprecated_legacy_test_execution = true
}
source_set("conformance_utils") {
testonly = true
public = [ "conformance_utils.h" ]
public_deps = [
"//zircon/system/public",
"//zircon/system/ulib/fidl:fidl-llcpp",
"//zircon/system/ulib/fidl:fidl_base",
"//zircon/system/ulib/zx",
]
# TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}