| # Copyright 2019 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/test.gni") |
| import("//build/test/test_package.gni") |
| import("//tools/fidl/gidl-conformance-suite/gidl-conformance-suite.gni") |
| import("//tools/fidl/gidl/gidl.gni") |
| |
| generated_source = "$target_gen_dir/conformance_suite_generated_test.cc" |
| |
| gidl("conformance_suite") { |
| testonly = true |
| language = "transformer" |
| inputs = conformance_suite_gidl_files |
| fidl = conformance_suite_fidl_target |
| output = generated_source |
| } |
| |
| source_set("test_sources") { |
| testonly = true |
| sources = [ |
| "transformer_conformance_utils.cc", |
| generated_source, |
| ] |
| |
| deps = [ |
| ":conformance_suite", |
| "//zircon/public/lib/fidl_base", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gtest", |
| conformance_suite_fidl_target + "_tables", |
| ] |
| include_dirs = [ |
| ".", |
| "//zircon/system/public", |
| ] |
| |
| configs += [ conformance_suite_fidl_target + "__config" ] |
| } |
| |
| test("fidl_transformer_tests") { |
| testonly = true |
| deps = [ ":test_sources" ] |
| } |
| |
| test_package("fidl_transformer_conformance") { |
| deps = [ ":fidl_transformer_tests" ] |
| binaries = [ |
| { |
| name = "fidl_transformer_tests" |
| }, |
| ] |
| tests = [ |
| { |
| name = "fidl_transformer_tests" |
| }, |
| ] |
| } |
| |
| if (is_linux || is_mac) { |
| test("fidl_transformer_host_tests") { |
| deps = [ ":test_sources" ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":fidl_transformer_conformance", |
| ":fidl_transformer_host_tests($host_toolchain)", |
| ] |
| } |