|  | # 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. | 
|  |  | 
|  | # [START imports] | 
|  | load( | 
|  | "@rules_fuchsia//fuchsia:defs.bzl", | 
|  | "fuchsia_cc_test", | 
|  | "fuchsia_component_manifest", | 
|  | "fuchsia_test_component", | 
|  | "fuchsia_test_package", | 
|  | ) | 
|  | # [END imports] | 
|  |  | 
|  | # [START cc_test] | 
|  | fuchsia_cc_test( | 
|  | name = "echo_integration_test", | 
|  | size = "small", | 
|  | srcs = ["echo_integration_test.cc"], | 
|  | deps = [ | 
|  | "//src/routing/fidl:examples.routing.echo.fidl_cc", | 
|  | "@com_google_googletest//:gtest_main", | 
|  | "@fuchsia_sdk//pkg/async-default", | 
|  | "@fuchsia_sdk//pkg/async-loop", | 
|  | "@fuchsia_sdk//pkg/async-loop-cpp", | 
|  | "@fuchsia_sdk//pkg/async-loop-default", | 
|  | "@fuchsia_sdk//pkg/component_incoming_cpp", | 
|  | "@fuchsia_sdk//pkg/fdio", | 
|  | "@fuchsia_sdk//pkg/syslog", | 
|  | ], | 
|  | ) | 
|  | # [END cc_test] | 
|  |  | 
|  | # [START component] | 
|  | fuchsia_component_manifest( | 
|  | name = "test_manifest", | 
|  | src = "meta/echo_integration_test.cml", | 
|  | component_name = "echo_integration_test_component", | 
|  | includes = [ | 
|  | "@fuchsia_sdk//pkg/sys/testing:elf_test_runner", | 
|  | "@fuchsia_sdk//pkg/syslog:client", | 
|  | ], | 
|  | ) | 
|  |  | 
|  | fuchsia_test_component( | 
|  | name = "echo_integration_test_component", | 
|  | manifest = ":test_manifest", | 
|  | visibility = ["//visibility:public"], | 
|  | deps = [":echo_integration_test"], | 
|  | ) | 
|  | # [END component] | 
|  |  | 
|  | # [START test_package] | 
|  | fuchsia_test_package( | 
|  | name = "test_pkg", | 
|  | package_name = "echo_integration_test", | 
|  | components = [ | 
|  | "//src/routing/cpp/echo_server:echo_server_component", | 
|  | ], | 
|  | test_components = [ | 
|  | ":echo_integration_test_component", | 
|  | ], | 
|  | visibility = ["//visibility:public"], | 
|  | ) | 
|  |  | 
|  | # [END test_package] |