blob: d6dba25dd929b15c406c8301e76269d6327adacd [file] [log] [blame]
# Copyright 2018 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/toolchain.gni")
import("//build/package.gni")
group("golang") {
testonly = true
deps = [
":compatibility_test_server_go_bin",
":fidl_compatibility_test_server_go",
":lib",
]
}
# The go_binary GN rule requires us to declare a go_library that creates the
# gopackage, even if the library doesn't have any sources.
go_library("lib") {
name = "compatibility_test"
deps = [
"//garnet/public/lib/fidl/compatibility_test:compatibility_test_service($go_toolchain)",
"//sdk/fidl/fuchsia.sys($go_toolchain)",
"//src/lib/component/go/src/app",
]
}
template("go_fidl_compatibility_test") {
not_needed(invoker, "*")
binary_target = "compatibility_test_server_${target_name}_bin"
binary_output = "compatibility_test_server_${target_name}"
package_target = "fidl_compatibility_test_server_${target_name}"
cmx_path = "meta/fidl_compatibility_test_server_${target_name}.cmx"
go_binary(binary_target) {
gopackage = "compatibility_test"
output_name = binary_output
if (defined(invoker.build_tag)) {
tags = [ invoker.build_tag ]
}
deps = [ ":lib" ]
}
package(package_target) {
testonly = true
deps = [ ":$binary_target" ]
binary = binary_output
meta = [
{
path = cmx_path
dest = "${target_name}.cmx"
},
]
}
}
go_fidl_compatibility_test("go") {
}