| # 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. |
| |
| ########################################## |
| # Though under //zircon, this build file # |
| # is meant to be used in the Fuchsia GN # |
| # build. # |
| # See fxbug.dev/36139. # |
| ########################################## |
| |
| assert(!defined(zx) || zx != "/", |
| "This file can only be used in the Fuchsia GN build.") |
| |
| import("//build/fidl/fidl.gni") |
| import("//build/test.gni") |
| import("//src/sys/build/fuchsia_unittest_package.gni") |
| |
| fuchsia_unittest_package("service-llcpp-unittest-package") { |
| executable_path = "test/service-llcpp-test" |
| deps = [ ":service-llcpp-test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":service-llcpp-unittest-package" ] |
| } |
| |
| test("service-llcpp-test") { |
| sources = [ |
| "llcpp/client_test.cc", |
| "llcpp/server_test.cc", |
| ] |
| deps = [ |
| ":fidl.service.test_llcpp", |
| "//sdk/lib/fdio", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/fidl-async", |
| "//zircon/system/ulib/fidl-async:fidl-async-cpp", |
| "//zircon/system/ulib/fs", |
| "//zircon/system/ulib/service:service-llcpp", |
| ] |
| } |
| |
| # Generate C bindings that the LLCPP bindings depend on. |
| fidl("fidl.service.test") { |
| testonly = true |
| visibility = [ ":*" ] |
| sources = [ "test.test.fidl" ] |
| } |