blob: 234b105687a4c4188ca97de3326527bf5cc79750 [file] [log] [blame] [edit]
# Copyright 2020 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/testing/golden_file.gni")
import("//third_party/protobuf/proto_library.gni")
go_library("proto_lib") {
source_dir = "proto"
sources = [
"context.pb.go",
"static.pb.go",
]
deps = [ "//third_party/golibs:github.com/golang/protobuf" ]
}
go_library("fint_lib") {
sources = [
"fint_test.go",
"main.go",
"parse.go",
"set.go",
"set_test.go",
]
deps = [
":proto_lib",
"//third_party/golibs:github.com/golang/protobuf",
"//third_party/golibs:github.com/google/subcommands",
"//tools/lib/color",
"//tools/lib/command",
"//tools/lib/logger",
"//tools/lib/osmisc",
"//tools/lib/runner",
]
}
go_binary("fint") {
gopackage = "go.fuchsia.dev/fuchsia/tools/integration/cmd/fint"
deps = [ ":fint_lib" ]
}
go_test("fint_tests") {
gopackages = [ "go.fuchsia.dev/fuchsia/tools/integration/cmd/fint" ]
deps = [ ":fint_lib" ]
}
proto_library("context") {
sources = [ "proto/context.proto" ]
generate_cc = false
generate_go = true
generate_python = false
}
proto_library("static") {
sources = [ "proto/static.proto" ]
generate_cc = false
generate_descriptor_set = true
generate_go = true
generate_python = false
}
golden_file("context_pb_go_diff") {
current = "${root_gen_dir}/go-proto-gen/src/tools/integration/cmd/fint/proto/context.pb.go"
golden = "proto/context.pb.go"
deps = [ ":context" ]
warn_on_changes = false
}
golden_file("static_pb_go_diff") {
current = "${root_gen_dir}/go-proto-gen/src/tools/integration/cmd/fint/proto/static.pb.go"
golden = "proto/static.pb.go"
deps = [ ":static" ]
warn_on_changes = false
}
golden_file("static_desc_pb_diff") {
current = "${target_out_dir}/static.desc.pb"
golden = "proto/static.desc.pb"
deps = [ ":static" ]
warn_on_changes = false
}
group("tests") {
testonly = true
deps = [
# The diff rules aren't really tests, but we want to ensure they're run in CQ.
":context_pb_go_diff",
":fint_tests",
":static_desc_pb_diff",
":static_pb_go_diff",
]
}