|  | # 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/cpp/sdk_shared_library.gni") | 
|  | import("//build/test.gni") | 
|  | import("//build/test/test_package.gni") | 
|  | import("//build/testing/environments.gni") | 
|  |  | 
|  | sdk_shared_library("svc") { | 
|  | category = "partner" | 
|  |  | 
|  | sources = [ | 
|  | "dir.cc", | 
|  | "dir.h", | 
|  | ] | 
|  |  | 
|  | public_deps = [ "//zircon/public/lib/async" ] | 
|  |  | 
|  | deps = [ | 
|  | "//sdk/lib/sys/cpp", | 
|  | "//sdk/lib/vfs/cpp", | 
|  | ] | 
|  |  | 
|  | include_base = "//sdk" | 
|  |  | 
|  | libcxx_linkage = "static" | 
|  |  | 
|  | public_configs = [ "//sdk/config" ] | 
|  |  | 
|  | runtime_deps = [ "//zircon/public/lib/fdio:fdio_sdk" ] | 
|  | } | 
|  |  | 
|  | test("svc_unittests") { | 
|  | sources = [ "dir_unittest.cc" ] | 
|  |  | 
|  | deps = [ | 
|  | ":svc", | 
|  | "//garnet/public/lib/gtest", | 
|  | "//src/lib/fxl/test:gtest_main", | 
|  | "//zircon/public/lib/fdio", | 
|  | "//zircon/public/lib/zx", | 
|  | ] | 
|  | } | 
|  |  | 
|  | test_package("svc_tests") { | 
|  | deps = [ ":svc_unittests" ] | 
|  |  | 
|  | tests = [ | 
|  | { | 
|  | name = "svc_unittests" | 
|  | environments = basic_envs | 
|  | }, | 
|  | ] | 
|  | } |