Skip to content

Commit

Permalink
fix(java): fixup test codegen for maven build (protocolbuffers#16176)
Browse files Browse the repository at this point in the history
## Summary

Fixes and closes protocolbuffers#16170 by adding missing test-gen mappings and exclusions. Recent [changes](protocolbuffers#15362) to Protocol Buffers, along with the addition of the _Editions_ feature, have evolved ahead of Maven; running the build on `main` shows build errors related to the testsuite.

## Changelog

- fix: missing test-gen mappings
- fix: missing test exclusions

Closes protocolbuffers#16176

COPYBARA_INTEGRATE_REVIEW=protocolbuffers#16176 from sgammon:fix/issue-16170 2be118c
PiperOrigin-RevId: 616310039
  • Loading branch information
sgammon authored and deannagarcia committed Jun 20, 2024
1 parent 06953bd commit 2b7c22e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions java/core/generate-test-sources-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<arg value="--proto_path=${test.proto.dir}"/>
<arg value="${protobuf.source.dir}/google/protobuf/map_lite_unittest.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_features.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_custom_options.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_enormous_descriptor.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_import.proto"/>
Expand All @@ -18,8 +19,10 @@
<arg value="${protobuf.source.dir}/google/protobuf/unittest_no_generic_services.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_optimize_for.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_proto3.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_proto3_extensions.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_proto3_optional.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_retention.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_legacy_features.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_well_known_types.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/any_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/cached_field_size_test.proto"/>
Expand Down
1 change: 1 addition & 0 deletions java/lite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@
<exclude>GeneratedMessageTest.java</exclude>
<exclude>LazyFieldTest.java</exclude>
<exclude>LazyStringEndToEndTest.java</exclude>
<exclude>LazilyParsedMessageSetTest.java</exclude>
<exclude>MapForProto2Test.java</exclude>
<exclude>MapTest.java</exclude>
<exclude>MessageTest.java</exclude>
Expand Down
1 change: 1 addition & 0 deletions java/util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
<arg value="--proto_path=${protobuf.source.dir}"/>
<arg value="--proto_path=src/test/proto"/>
<arg value="src/test/proto/com/google/protobuf/util/json_test.proto"/>
<arg value="src/test/proto/com/google/protobuf/util/json_test_proto2.proto"/>
</exec>
</target>
</configuration>
Expand Down

0 comments on commit 2b7c22e

Please sign in to comment.