Avoid double counting lite test protos

This is likely the cause of our macos cmake flakes.  Both the lite and full tests trigger codegen of the lite protos, but there's no dependency between them.  This creates a race condition, where it's possible for the files to be invalid by the time one of their builds is triggered.  This is consistent with the error message we see:
liblibtest_common_lite.a(unittest_lite.pb.cc.o) has no symbols

PiperOrigin-RevId: 573381442
pull/14399/head
Mike Kruskal 1 year ago committed by Copybara-Service
parent 4b301ad764
commit 4a24a29780
  1. 4
      cmake/tests.cmake

@ -15,7 +15,6 @@ set(tests_protos
${protobuf_test_protos_files}
${compiler_test_protos_files}
${util_test_protos_files}
${lite_test_protos}
)
set(protoc_cpp_args)
@ -120,6 +119,7 @@ if (MSVC)
endif()
target_link_libraries(tests
libtest_common
libtest_common_lite
${protobuf_LIB_PROTOC}
${protobuf_LIB_PROTOBUF}
${protobuf_ABSL_USED_TARGETS}
@ -131,6 +131,7 @@ add_executable(fake_plugin ${fake_plugin_files} ${common_test_files})
target_include_directories(fake_plugin PRIVATE ${ABSL_ROOT_DIR})
target_link_libraries(fake_plugin
libtest_common
libtest_common_lite
${protobuf_LIB_PROTOC}
${protobuf_LIB_PROTOBUF}
${protobuf_ABSL_USED_TARGETS}
@ -142,6 +143,7 @@ add_executable(test_plugin ${test_plugin_files} ${common_test_files})
target_include_directories(test_plugin PRIVATE ${ABSL_ROOT_DIR})
target_link_libraries(test_plugin
libtest_common
libtest_common_lite
${protobuf_LIB_PROTOC}
${protobuf_LIB_PROTOBUF}
${protobuf_ABSL_USED_TARGETS}

Loading…
Cancel
Save