diff --git a/BUILD b/BUILD index 2e8ab829341..597b191037c 100644 --- a/BUILD +++ b/BUILD @@ -2630,7 +2630,7 @@ grpc_cc_library_xds( alwayslink = 1, ) -grpc_cc_library( +grpc_cc_library_xds( name = "grpcpp_admin", srcs = [ "src/cpp/server/admin/admin_services.cc", diff --git a/test/cpp/end2end/BUILD b/test/cpp/end2end/BUILD index 4afead2e888..cdd40faff10 100644 --- a/test/cpp/end2end/BUILD +++ b/test/cpp/end2end/BUILD @@ -874,7 +874,7 @@ grpc_cc_test( ], ) -grpc_cc_test( +grpc_cc_test_xds( name = "admin_services_end2end_test", srcs = ["admin_services_end2end_test.cc"], external_deps = [ diff --git a/test/cpp/end2end/admin_services_end2end_test.cc b/test/cpp/end2end/admin_services_end2end_test.cc index 6e4c6fbfeb7..31fc7f39fd4 100644 --- a/test/cpp/end2end/admin_services_end2end_test.cc +++ b/test/cpp/end2end/admin_services_end2end_test.cc @@ -21,7 +21,6 @@ #include "absl/strings/str_cat.h" -#include #include #include @@ -29,6 +28,9 @@ #include "test/core/util/port.h" #include "test/core/util/test_config.h" +#ifndef DISABLED_XDS_PROTO_IN_CC +#include + namespace grpc { namespace testing { @@ -95,6 +97,8 @@ TEST_F(AdminServicesTest, XdsDisabled) { } // namespace testing } // namespace grpc +#endif // DISABLED_XDS_PROTO_IN_CC + int main(int argc, char** argv) { grpc::testing::TestEnvironment env(argc, argv); ::testing::InitGoogleTest(&argc, argv);