blob: 084255e619dcb32a91b1a818574635173a77cf99 [file] [log] [blame]
# 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/testing/host_test_data.gni")
import("//tools/fidl/fidlc/testdata/info.gni")
group("tests") {
testonly = true
deps = [ ":fidlc-test($host_toolchain)" ]
}
host_test_data("errcat_fidl_bad") {
_dir = "fidl/bad"
sources = rebase_path(read_file("$_dir/files.txt", "list lines"), ".", _dir)
outputs = [ "$root_out_dir/fidlc-tests/bad/{{source_file_part}}" ]
}
host_test_data("errcat_fidl_good") {
_dir = "fidl/good"
sources = rebase_path(read_file("$_dir/files.txt", "list lines"), ".", _dir)
outputs = [ "$root_out_dir/fidlc-tests/good/{{source_file_part}}" ]
}
host_test_data("errcat_md") {
_dir = "//docs/reference/fidl/language/error-catalog"
sources = rebase_path(read_file("$_dir/_files.txt", "list lines"), ".", _dir)
outputs = [ "$root_out_dir/fidlc-tests/error-catalog/{{source_file_part}}" ]
}
host_test_data("errcat_other") {
sources = [
"//docs/error/_redirects.yaml",
"//docs/reference/fidl/language/errcat.md",
"errcat_good_tests.cc",
]
outputs = [ "$root_out_dir/fidlc-tests/{{source_file_part}}" ]
}
relative_root_out_dir = rebase_path(root_out_dir, root_build_dir)
test("fidlc-test") {
defines = [ "TEST_DATA_ROOT=\"${relative_root_out_dir}\"" ]
sources = [
"alias_tests.cc",
"array_tests.cc",
"attributes_tests.cc",
"bits_tests.cc",
"canonical_names_tests.cc",
"consts_tests.cc",
"declaration_order_tests.cc",
"direct_dependencies_tests.cc",
"enums_tests.cc",
"errcat_docs_tests.cc",
"errcat_good_tests.cc",
"errors_tests.cc",
"flat_ast_tests.cc",
"flexible_tests.cc",
"formatter_tests.cc",
"generated_name_tests.cc",
"handle_tests.cc",
"json_diagnostics_tests.cc",
"json_findings_tests.cc",
"library_tests.cc",
"lint_findings_tests.cc",
"lint_tests.cc",
"method_tests.cc",
"new_type_tests.cc",
"ordinals_tests.cc",
"overlay_tests.cc",
"parsing_tests.cc",
"protocol_tests.cc",
"recoverable_compilation_tests.cc",
"recoverable_parsing_tests.cc",
"reporter_tests.cc",
"resource_tests.cc",
"resourceness_tests.cc",
"service_tests.cc",
"span_tests.cc",
"strictness_tests.cc",
"string_array_tests.cc",
"structs_tests.cc",
"table_tests.cc",
"test_library.cc",
"transport_tests.cc",
"types_tests.cc",
"typeshape_tests.cc",
"union_tests.cc",
"using_tests.cc",
"utils_tests.cc",
"versioning_attribute_tests.cc",
"versioning_basic_tests.cc",
"versioning_decomposition_tests.cc",
"versioning_inheritance_tests.cc",
"versioning_interleaving_tests.cc",
"versioning_overlap_tests.cc",
"versioning_platform_tests.cc",
"versioning_replacement_tests.cc",
"versioning_types_tests.cc",
"virtual_source_tests.cc",
]
deps = [
":errcat_fidl_bad",
":errcat_fidl_good",
":errcat_md",
":errcat_other",
"//src/lib/fxl/test:gtest_main",
"//third_party/boringssl",
"//third_party/googletest:gmock",
"//tools/fidl/fidlc:lib",
]
}