| # 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/test.gni") | 
 | import("//build/test/test_package.gni") | 
 | import("//build/testing/environments.gni") | 
 |  | 
 | test("component_cpp_unittests") { | 
 |   sources = [ | 
 |     "component_context_unittest.cc", | 
 |     "echo_server.h", | 
 |     "file_descriptor_unittest.cc", | 
 |     "outgoing_directory_unittest.cc", | 
 |     "service_directory_unittest.cc", | 
 |   ] | 
 |  | 
 |   deps = [ | 
 |     "//garnet/public/lib/gtest", | 
 |     "//sdk/fidl/fuchsia.io", | 
 |     "//sdk/lib/fdio", | 
 |     "//sdk/lib/sys/cpp", | 
 |     "//src/lib/fxl/test:gtest_main", | 
 |     "//src/testing/fidl:placeholders", | 
 |     "//zircon/public/lib/fidl", | 
 |   ] | 
 |  | 
 |   # TODO(fxbug.dev/58162): delete the below and fix compiler warnings | 
 |   configs += [ "//build/config:Wno-conversion" ] | 
 | } | 
 |  | 
 | test("component_cpp_testing_unittests") { | 
 |   sources = [ | 
 |     "component_context_provider_unittest.cc", | 
 |     "echo_server.h", | 
 |     "service_directory_provider_unittest.cc", | 
 |   ] | 
 |  | 
 |   deps = [ | 
 |     "//garnet/public/lib/gtest", | 
 |     "//sdk/fidl/fuchsia.io", | 
 |     "//sdk/lib/sys/cpp/testing:unit", | 
 |     "//src/lib/fxl/test:gtest_main", | 
 |     "//src/testing/fidl:placeholders", | 
 |     "//zircon/public/lib/fidl", | 
 |   ] | 
 | } | 
 |  | 
 | test("component_cpp_testing_tests") { | 
 |   sources = [ | 
 |     "component_interceptor_unittest.cc", | 
 |     "enclosing_environment_test.cc", | 
 |   ] | 
 |  | 
 |   deps = [ | 
 |     "//garnet/public/lib/gtest", | 
 |     "//sdk/fidl/fuchsia.debugdata", | 
 |     "//sdk/fidl/fuchsia.io", | 
 |     "//sdk/lib/sys/cpp/testing:integration", | 
 |     "//src/lib/fxl/test:gtest_main", | 
 |     "//src/testing/fidl:placeholders", | 
 |     "//zircon/public/lib/fidl", | 
 |   ] | 
 |  | 
 |   # TODO(fxbug.dev/58162): delete the below and fix compiler warnings | 
 |   configs += [ "//build/config:Wno-conversion" ] | 
 | } | 
 |  | 
 | executable("helper_proc") { | 
 |   testonly = true | 
 |  | 
 |   sources = [ "helper.cc" ] | 
 |  | 
 |   deps = [ | 
 |     "//sdk/lib/fidl/cpp", | 
 |     "//sdk/lib/sys/cpp", | 
 |     "//src/lib/fxl", | 
 |     "//src/testing/fidl:placeholders", | 
 |     "//zircon/public/lib/async-cpp", | 
 |     "//zircon/system/ulib/async-loop:async-loop-cpp", | 
 |     "//zircon/system/ulib/async-loop:async-loop-default", | 
 |   ] | 
 | } | 
 |  | 
 | executable("constructor_helper_proc") { | 
 |   testonly = true | 
 |  | 
 |   sources = [ "constructor_helper.cc" ] | 
 |  | 
 |   deps = [ | 
 |     "//sdk/lib/fidl/cpp", | 
 |     "//sdk/lib/sys/cpp", | 
 |     "//src/lib/files", | 
 |     "//src/lib/fxl", | 
 |     "//src/testing/fidl:placeholders", | 
 |     "//zircon/public/lib/async-cpp", | 
 |     "//zircon/system/ulib/async-loop:async-loop-cpp", | 
 |     "//zircon/system/ulib/async-loop:async-loop-default", | 
 |   ] | 
 | } | 
 |  | 
 | test_package("component_cpp_tests") { | 
 |   deps = [ | 
 |     ":component_cpp_testing_tests", | 
 |     ":component_cpp_testing_unittests", | 
 |     ":component_cpp_unittests", | 
 |     ":constructor_helper_proc", | 
 |     ":helper_proc", | 
 |   ] | 
 |  | 
 |   binaries = [ | 
 |     { | 
 |       name = "constructor_helper_proc" | 
 |     }, | 
 |     { | 
 |       name = "helper_proc" | 
 |     }, | 
 |   ] | 
 |  | 
 |   meta = [ | 
 |     { | 
 |       path = rebase_path("meta/helper_proc.cmx") | 
 |       dest = "helper_proc.cmx" | 
 |     }, | 
 |   ] | 
 |  | 
 |   tests = [ | 
 |     { | 
 |       name = "component_cpp_unittests" | 
 |       environments = basic_envs | 
 |     }, | 
 |     { | 
 |       name = "component_cpp_testing_unittests" | 
 |       environments = basic_envs | 
 |     }, | 
 |     { | 
 |       name = "component_cpp_testing_tests" | 
 |       environments = basic_envs | 
 |     }, | 
 |   ] | 
 | } |