| # 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/components.gni") |
| import("//build/test.gni") |
| |
| test("component_cpp_unittests_bin") { |
| 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:fuchsia.io_llcpp", |
| "//sdk/lib/fdio", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/testing/fidl:placeholders", |
| "//zircon/public/lib/fidl", |
| ] |
| } |
| |
| fuchsia_unittest_component("component_cpp_unittests") { |
| manifest = "meta/component_cpp_unittests.cmx" |
| deps = [ ":component_cpp_unittests_bin" ] |
| } |
| |
| test("component_cpp_testing_unittests_bin") { |
| 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", |
| ] |
| } |
| |
| fuchsia_unittest_component("component_cpp_testing_unittests") { |
| deps = [ ":component_cpp_testing_unittests_bin" ] |
| manifest = "meta/component_cpp_testing_unittests.cmx" |
| } |
| |
| test("component_cpp_testing_tests_bin") { |
| sources = [ |
| "component_interceptor_unittest.cc", |
| "enclosing_environment_test.cc", |
| "realm_builder_unittest.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", |
| ] |
| } |
| |
| fuchsia_unittest_component("component_cpp_testing_tests") { |
| deps = [ ":component_cpp_testing_tests_bin" ] |
| manifest = "meta/component_cpp_testing_tests.cmx" |
| } |
| |
| executable("helper_proc_bin") { |
| 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", |
| ] |
| } |
| |
| fuchsia_component("helper_proc") { |
| deps = [ ":helper_proc_bin" ] |
| manifest = "meta/helper_proc.cmx" |
| testonly = true |
| } |
| |
| 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", |
| ] |
| } |
| |
| fuchsia_test_package("component_cpp_tests") { |
| test_components = [ |
| ":component_cpp_testing_tests", |
| ":component_cpp_testing_unittests", |
| ":component_cpp_unittests", |
| ] |
| deps = [ |
| ":constructor_helper_proc", |
| ":helper_proc", |
| ] |
| } |