Enable GeneratedDescriptorTest.EnormousDescriptor test for GCC/Clang CMake builds (#9617)

pull/9628/head
Arfrever Frehtes Taifersar Arahesis 3 years ago committed by GitHub
parent bd935e101d
commit 5dab09408c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      cmake/tests.cmake
  2. 6
      src/google/protobuf/compiler/cpp/cpp_unittest.inc
  3. 7
      update_file_lists.sh

@ -56,6 +56,7 @@ set(tests_protos
google/protobuf/unittest_drop_unknown_fields.proto google/protobuf/unittest_drop_unknown_fields.proto
google/protobuf/unittest_embed_optimize_for.proto google/protobuf/unittest_embed_optimize_for.proto
google/protobuf/unittest_empty.proto google/protobuf/unittest_empty.proto
google/protobuf/unittest_enormous_descriptor.proto
google/protobuf/unittest_import.proto google/protobuf/unittest_import.proto
google/protobuf/unittest_import_public.proto google/protobuf/unittest_import_public.proto
google/protobuf/unittest_lazy_dependencies.proto google/protobuf/unittest_lazy_dependencies.proto

@ -51,8 +51,8 @@
#include <google/protobuf/compiler/cpp/cpp_unittest.h> #include <google/protobuf/compiler/cpp/cpp_unittest.h>
#include <google/protobuf/stubs/strutil.h> #include <google/protobuf/stubs/strutil.h>
#if !defined(GOOGLE_PROTOBUF_CMAKE_BUILD) && !defined(_MSC_VER) #ifndef _MSC_VER
// We exclude this large proto from cmake build because it's too large for // We exclude this large proto because it's too large for
// visual studio to compile (report internal errors). // visual studio to compile (report internal errors).
#include <google/protobuf/unittest_enormous_descriptor.pb.h> #include <google/protobuf/unittest_enormous_descriptor.pb.h>
#endif #endif
@ -138,7 +138,7 @@ TEST(GENERATED_DESCRIPTOR_TEST_NAME, IdenticalDescriptors) {
generated_descriptor_proto.DebugString()); generated_descriptor_proto.DebugString());
} }
#if !defined(GOOGLE_PROTOBUF_CMAKE_BUILD) && !defined(_MSC_VER) #ifndef _MSC_VER
// Test that generated code has proper descriptors: // Test that generated code has proper descriptors:
// Touch a descriptor generated from an enormous message to validate special // Touch a descriptor generated from an enormous message to validate special
// handling for descriptors exceeding the C++ standard's recommended minimum // handling for descriptors exceeding the C++ standard's recommended minimum

@ -27,10 +27,6 @@ get_source_files() {
get_variable_value $@ | grep "cc$\|inc$" get_variable_value $@ | grep "cc$\|inc$"
} }
get_proto_files_blacklisted() {
get_proto_files $@ | sed '/^google\/protobuf\/unittest_enormous_descriptor.proto$/d'
}
get_proto_files() { get_proto_files() {
get_variable_value $@ | grep "pb.cc$" | sed "s/pb.cc/proto/" get_variable_value $@ | grep "pb.cc$" | sed "s/pb.cc/proto/"
} }
@ -58,7 +54,6 @@ LIBPROTOC_SOURCES=$(get_source_files $MAKEFILE libprotoc_la_SOURCES)
LIBPROTOC_HEADERS=$(get_variable_value $MAKEFILE nobase_include_HEADERS | grep /compiler/) LIBPROTOC_HEADERS=$(get_variable_value $MAKEFILE nobase_include_HEADERS | grep /compiler/)
LITE_PROTOS=$(get_proto_files $MAKEFILE protoc_lite_outputs) LITE_PROTOS=$(get_proto_files $MAKEFILE protoc_lite_outputs)
PROTOS=$(get_proto_files $MAKEFILE protoc_outputs) PROTOS=$(get_proto_files $MAKEFILE protoc_outputs)
PROTOS_BLACKLISTED=$(get_proto_files_blacklisted $MAKEFILE protoc_outputs)
WKT_PROTOS=$(get_variable_value $MAKEFILE nobase_dist_proto_DATA) WKT_PROTOS=$(get_variable_value $MAKEFILE nobase_dist_proto_DATA)
COMMON_TEST_SOURCES=$(get_source_files $MAKEFILE COMMON_TEST_SOURCES) COMMON_TEST_SOURCES=$(get_source_files $MAKEFILE COMMON_TEST_SOURCES)
COMMON_LITE_TEST_SOURCES=$(get_source_files $MAKEFILE COMMON_LITE_TEST_SOURCES) COMMON_LITE_TEST_SOURCES=$(get_source_files $MAKEFILE COMMON_LITE_TEST_SOURCES)
@ -124,7 +119,7 @@ set_cmake_value $CMAKE_DIR/libprotobuf.cmake libprotobuf_files $CMAKE_PREFIX $LI
set_cmake_value $CMAKE_DIR/libprotoc.cmake libprotoc_files $CMAKE_PREFIX $LIBPROTOC_SOURCES set_cmake_value $CMAKE_DIR/libprotoc.cmake libprotoc_files $CMAKE_PREFIX $LIBPROTOC_SOURCES
set_cmake_value $CMAKE_DIR/libprotoc.cmake libprotoc_headers $CMAKE_PREFIX $LIBPROTOC_HEADERS set_cmake_value $CMAKE_DIR/libprotoc.cmake libprotoc_headers $CMAKE_PREFIX $LIBPROTOC_HEADERS
set_cmake_value $CMAKE_DIR/tests.cmake lite_test_protos "" $LITE_PROTOS set_cmake_value $CMAKE_DIR/tests.cmake lite_test_protos "" $LITE_PROTOS
set_cmake_value $CMAKE_DIR/tests.cmake tests_protos "" $PROTOS_BLACKLISTED set_cmake_value $CMAKE_DIR/tests.cmake tests_protos "" $PROTOS
set_cmake_value $CMAKE_DIR/tests.cmake common_test_files $CMAKE_PREFIX '${common_lite_test_files}' $COMMON_TEST_SOURCES set_cmake_value $CMAKE_DIR/tests.cmake common_test_files $CMAKE_PREFIX '${common_lite_test_files}' $COMMON_TEST_SOURCES
set_cmake_value $CMAKE_DIR/tests.cmake common_lite_test_files $CMAKE_PREFIX $COMMON_LITE_TEST_SOURCES set_cmake_value $CMAKE_DIR/tests.cmake common_lite_test_files $CMAKE_PREFIX $COMMON_LITE_TEST_SOURCES
set_cmake_value $CMAKE_DIR/tests.cmake tests_files $CMAKE_PREFIX $TEST_SOURCES set_cmake_value $CMAKE_DIR/tests.cmake tests_files $CMAKE_PREFIX $TEST_SOURCES

Loading…
Cancel
Save