| # 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/components.gni") | |
| import("//build/fidl/fidl.gni") | |
| import("//build/go/go_library.gni") | |
| import("//build/go/go_test.gni") | |
| import("//build/go/toolchain.gni") | |
| fidl("bindingstest") { | |
| public_deps = [ "//zircon/vdso/zx" ] | |
| sources = [ "test.test.fidl" ] | |
| } | |
| go_library("component") { | |
| deps = [ | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_go($go_toolchain)", | |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys_go($go_toolchain)", | |
| "//third_party/golibs:github.com/google/go-cmp", | |
| "//third_party/golibs:golang.org/x/sync", | |
| ] | |
| sources = [ | |
| "context.go", | |
| "context_test.go", | |
| "io.go", | |
| "io_test.go", | |
| "serve.go", | |
| "serve_test.go", | |
| ] | |
| } | |
| go_test("component_test") { | |
| library = ":component" | |
| deps = [ ":bindingstest_go($go_toolchain)" ] | |
| } | |
| fuchsia_unittest_package("lib-component-go-unittests") { | |
| deps = [ ":component_test" ] | |
| test_specs = { | |
| environments = [ emu_env ] | |
| } | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ ":lib-component-go-unittests" ] | |
| } |