blob: f3aabb1d3da0198385fa68ab6862aaf7c399de27 [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")
group("model") {
testonly = true
deps = [ ":tests" ]
}
if (is_host) {
go_library("gopkg") {
sources = [
"model.go",
"model_test.go",
"report.go",
]
deps = [
"//third_party/golibs:github.com/google/go-cmp",
"//third_party/golibs:gopkg.in/yaml.v2",
]
}
_testdata_path = "${target_gen_dir}/testdata"
go_test("model_test") {
output_name = "model_test"
gopackages = [ "go.fuchsia.dev/fuchsia/sdk/cts/plasa/model" ]
args = [
"--test_data_dir",
rebase_path(_testdata_path, root_build_dir),
]
deps = [ ":gopkg" ]
non_go_deps = [ ":testdatafiles" ]
}
host_test_data("testdatafiles") {
sources = [
"testdata/@nonymous_record_FFBFAD8A3BBD799586600B40A3453BBD95900F13.yaml",
"testdata/GlobalNamespace/index.yaml",
"testdata/zx/basic_time.yaml",
"testdata/zx/bti.yaml",
"testdata/zx/channel.yaml",
"testdata/zx/clock.yaml",
"testdata/zx/debuglog.yaml",
"testdata/zx/duration.yaml",
]
outputs = [ "${_testdata_path}/{{source_file_part}}" ]
}
} # is_host
group("tests") {
testonly = true
deps = [
":model_test($host_toolchain)",
":testdatafiles($host_toolchain)",
]
}