blob: 0fbce7e68a6eb9b732458305543776e96d54b070 [file] [log] [blame]
# 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/go/go_binary.gni")
import("//build/go/go_library.gni")
import("//build/go/go_test.gni")
import("//build/host.gni")
import("//build/testing/host_test_data.gni")
if (is_host) {
go_library("gopkg") {
sources = [
"main.go",
"report_test.go",
]
deps = [
"//sdk/cts/plasa/model:gopkg",
"//third_party/golibs:github.com/google/go-cmp",
"//third_party/golibs:gopkg.in/yaml.v2",
]
}
go_binary("clang_doc_filter") {
gopackage = "go.fuchsia.dev/fuchsia/sdk/cts/plasa/clang_doc_filter"
deps = [ ":gopkg" ]
}
_testdata_path = "${target_gen_dir}/testdata"
go_test("clang_doc_filter_test") {
output_name = "clang_doc_filter_test"
gopackages = [ "go.fuchsia.dev/fuchsia/sdk/cts/plasa/clang_doc_filter" ]
args = [
"--test_data_dir",
rebase_path(_testdata_path, root_build_dir),
]
deps = [ ":gopkg" ]
non_go_deps = [ ":testdatadir" ]
}
host_test_data("testdatadir") {
sources = [
"testdata/@nonymous_record_FFBFAD8A3BBD799586600B40A3453BBD95900F13.yaml",
"testdata/channel.yaml",
"testdata/index.yaml",
]
outputs = [ "${_testdata_path}/{{source_file_part}}" ]
}
} # is_host
install_host_tools("host") {
deps = [ ":clang_doc_filter" ]
outputs = [ "clang_doc_filter" ]
}
group("tests") {
testonly = true
deps = [
":clang_doc_filter_test($host_toolchain)",
":testdatadir($host_toolchain)",
]
}