| # Copyright 2022 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. |
| |
| assert(is_fuchsia, "These targets are only compiled in the fuchsia toolchain.") |
| |
| # [START imports] |
| import("//build/components.gni") |
| |
| # [END imports] |
| |
| # [START example_snippet] |
| # [START executable] |
| executable("bin") { |
| output_name = "echo_integration_test_cpp" |
| sources = [ "echo_integration_test.cc" ] |
| deps = [ |
| "//examples/components/routing/fidl:echo_hlcpp", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gtest", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| testonly = true |
| } |
| |
| # [END executable] |
| |
| # [START component] |
| fuchsia_component("echo_integration_test_component") { |
| testonly = true |
| component_name = "echo_integration_test" |
| manifest = "meta/echo_integration_test.cml" |
| deps = [ ":bin" ] |
| } |
| |
| # [END component] |
| |
| # [START test_package] |
| fuchsia_test_package("echo_integration_test_cpp") { |
| test_components = [ ":echo_integration_test_component" ] |
| deps = [ "//examples/components/routing/cpp/echo_server:echo_server_cmp" ] |
| } |
| |
| # [END test_package] |
| # [END example_snippet] |
| |
| fuchsia_test_component("subpackaged_echo_integration_test_cpp_component") { |
| manifest = "meta/subpackaged_echo_integration_test.cml" |
| component_name = "default" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_test_package("subpackaged_echo_integration_test_cpp") { |
| test_components = [ ":subpackaged_echo_integration_test_cpp_component" ] |
| subpackages = [ "//examples/components/routing/cpp/echo_server" ] |
| } |
| |
| group("hermetic_tests") { |
| testonly = true |
| deps = [ |
| ":echo_integration_test_cpp", |
| ":subpackaged_echo_integration_test_cpp", |
| ] |
| } |