Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 38 additions & 1 deletion test/common/router/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,13 @@ envoy_cc_test(

envoy_cc_test(
name = "router_test",
srcs = ["router_test.cc"],
srcs = [
# Split to avoid compiler OOM, especially on ASAN.
"router_test.cc",
"router_2_test.cc",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we need 2 test targets to run them individually?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem occurs during compilation, because the file grew too large (~6K SLOC), not running the test, which is fast. I could split it into two test targets but I'm unsure how it will affect corpus generation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's config_impl_test that generates a corpus, not router_test.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in that case WDYT about making 2 test targets, Yan?

],
deps = [
":router_test_base_lib",
"//source/common/buffer:buffer_lib",
"//source/common/http:context_lib",
"//source/common/network:application_protocol_lib",
Expand Down Expand Up @@ -315,6 +320,38 @@ envoy_cc_test(
],
)

envoy_cc_test_library(
name = "router_test_base_lib",
srcs = ["router_test_base.cc"],
hdrs = ["router_test_base.h"],
deps = [
"//source/common/buffer:buffer_lib",
"//source/common/http:context_lib",
"//source/common/network:application_protocol_lib",
"//source/common/network:utility_lib",
"//source/common/router:router_lib",
"//source/common/stream_info:uint32_accessor_lib",
"//source/common/upstream:upstream_includes",
"//source/common/upstream:upstream_lib",
"//source/extensions/upstreams/http/generic:config",
"//source/extensions/upstreams/http/http:config",
"//source/extensions/upstreams/http/tcp:config",
"//test/common/http:common_lib",
"//test/mocks/http:http_mocks",
"//test/mocks/local_info:local_info_mocks",
"//test/mocks/network:network_mocks",
"//test/mocks/router:router_mocks",
"//test/mocks/runtime:runtime_mocks",
"//test/mocks/ssl:ssl_mocks",
"//test/mocks/upstream:cluster_manager_mocks",
"//test/mocks/upstream:host_mocks",
"//test/test_common:environment_lib",
"//test/test_common:simulated_time_system_lib",
"//test/test_common:test_runtime_lib",
"//test/test_common:utility_lib",
],
)

envoy_cc_test(
name = "router_upstream_log_test",
srcs = ["router_upstream_log_test.cc"],
Expand Down
Loading