| # 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/fidl/fidl.gni") |
| 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") |
| |
| go_library("lib") { |
| name = "gidl" |
| |
| deps = [ "//garnet/go/src/fidl:fidl_lib" ] |
| } |
| |
| go_binary("gidl") { |
| gopackage = "gidl" |
| |
| deps = [ ":lib" ] |
| } |
| |
| install_host_tools("host") { |
| deps = [ ":gidl" ] |
| outputs = [ "gidl" ] |
| } |
| |
| fidl("gidl_mixer_test_fidl") { |
| name = "test.mixer" |
| testonly = true |
| sources = [ "//tools/fidl/gidl/mixer/mixer.test.fidl" ] |
| } |
| |
| if (is_host) { |
| go_test("gidl_parser_test") { |
| gopackages = [ "gidl/parser" ] |
| |
| deps = [ ":lib" ] |
| } |
| |
| go_test("gidl_golang_test") { |
| gopackages = [ "gidl/golang" ] |
| |
| deps = [ ":lib" ] |
| } |
| |
| host_test_data("gidl_mixer_test_json") { |
| deps = [ ":gidl_mixer_test_fidl($fidl_toolchain)" ] |
| sources = [ "$root_build_dir/fidling/gen/tools/fidl/gidl/gidl_mixer_test_fidl.fidl.json" ] |
| outputs = [ "$root_out_dir/test_data/gidl/mixer.test.fidl.json" ] |
| } |
| |
| go_test("gidl_mixer_test") { |
| gopackages = [ "gidl/mixer" ] |
| |
| deps = [ ":lib" ] |
| non_go_deps = [ ":gidl_mixer_test_json" ] |
| } |
| } |