Skip to content

Commit

Permalink
[test] Replace printers_include with printers_lib. (#14442)
Browse files Browse the repository at this point in the history
Commit Message: Remove the "printers_include" library in favour of "printers_lib".

Additional Description: The partial, header-only library :printers_include provided no service that wasn't already subsumed by :printers_lib.

This change removes the defunct library printers_include and changes
printers_lib to export the printers.h header. The Starlark rule
envoy_cc_test_library no longer adds the printer dependency, and
instead the now-missing dependencies on the new printers_lib target
are added to a small number of targets that need them.


Risk Level: low
Testing: tests pass
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Thomas Köppe <[email protected]>
  • Loading branch information
tkoeppe authored Dec 17, 2020
1 parent f0df6f1 commit 5e6c4b9
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 17 deletions.
4 changes: 0 additions & 4 deletions bazel/envoy_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,6 @@ def envoy_cc_test_library(
copts = [],
alwayslink = 1,
**kargs):
deps = deps + [
repository + "//test/test_common:printers_includes",
]

_envoy_cc_test_infrastructure_library(
name,
srcs,
Expand Down
1 change: 1 addition & 0 deletions test/config/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ envoy_cc_test_library(
"//test/integration:server_stats_interface",
"//test/test_common:environment_lib",
"//test/test_common:network_utility_lib",
"//test/test_common:printers_lib",
"//test/test_common:resources_lib",
"//test/test_common:utility_lib",
"@envoy_api//envoy/config/bootstrap/v3:pkg_cc_proto",
Expand Down
1 change: 1 addition & 0 deletions test/extensions/filters/network/common/redis/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ envoy_cc_mock(
"//source/common/common:assert_lib",
"//source/extensions/filters/network/common/redis:client_lib",
"//source/extensions/filters/network/common/redis:codec_lib",
"//test/test_common:printers_lib",
],
)

Expand Down
1 change: 1 addition & 0 deletions test/extensions/filters/network/redis_proxy/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ envoy_cc_mock(
"//source/extensions/filters/network/redis_proxy:command_splitter_interface",
"//source/extensions/filters/network/redis_proxy:conn_pool_interface",
"//source/extensions/filters/network/redis_proxy:router_interface",
"//test/test_common:printers_lib",
],
)

Expand Down
1 change: 1 addition & 0 deletions test/mocks/buffer/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ envoy_cc_mock(
deps = [
"//source/common/buffer:buffer_lib",
"//source/common/buffer:watermark_buffer_lib",
"//test/test_common:printers_lib",
"//test/test_common:utility_lib",
],
)
16 changes: 3 additions & 13 deletions test/test_common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@ licenses(["notice"]) # Apache 2

envoy_package()

envoy_basic_cc_library(
name = "printers_includes",
hdrs = ["printers.h"],
deps = [
":printers_lib",
"//include/envoy/network:address_interface",
],
)

envoy_cc_test_library(
name = "environment_lib",
srcs = ["environment.cc"],
Expand Down Expand Up @@ -87,10 +78,8 @@ envoy_cc_test_library(

envoy_cc_library(
name = "printers_lib",
srcs = [
"printers.cc",
"printers.h",
],
srcs = ["printers.cc"],
hdrs = ["printers.h"],
deps = [
"//include/envoy/network:address_interface",
"//source/common/buffer:buffer_lib",
Expand Down Expand Up @@ -121,6 +110,7 @@ envoy_cc_test_library(
],
deps = [
":file_system_for_test_lib",
":printers_lib",
":resources_lib",
":test_time_lib",
":thread_factory_for_test_lib",
Expand Down

0 comments on commit 5e6c4b9

Please sign in to comment.