build_test.cc 764 B

123456789101112131415161718192021222324
  1. // NOLINT(namespace-envoy)
  2. #include <cstdlib>
  3. #include <iostream>
  4. #include "google/protobuf/descriptor.h"
  5. // Basic C++ build/link validation for the v2 xDS APIs.
  6. int main(int argc, char* argv[]) {
  7. const char* methods[] = {
  8. "xds.service.orca.v3.OpenRcaService.StreamCoreMetrics",
  9. // Old name for backward compatibility.
  10. // TODO(roth): Remove once all callers are updated to use the new name.
  11. "udpa.service.orca.v1.OpenRcaService.StreamCoreMetrics",
  12. };
  13. for (const char* method : methods) {
  14. if (google::protobuf::DescriptorPool::generated_pool()->FindMethodByName(method) == nullptr) {
  15. std::cout << "Unable to find method descriptor for " << method << std::endl;
  16. exit(EXIT_FAILURE);
  17. }
  18. }
  19. exit(EXIT_SUCCESS);
  20. }