Add head_generated_message_test_srcjars and head_generated_message_test_binjars for checked-in tests using checked-in jars. WKT jars are not included to prevent ODR violations interfering with feature resolution

25.x-compat-tests
Sandy Zhang 3 months ago
parent 867e78a8be
commit 8f010a1261
  1. 58
      java/core/BUILD.bazel

@ -436,6 +436,64 @@ junit_tests(
],
)
java_library(
name = "25.0_gencode",
srcs = [
"v25.0_gencode/src_jars/generic_test_protos-speed-src.srcjar",
"v25.0_gencode/src_jars/java_test_protos-speed-src.srcjar",
"v25.0_gencode/src_jars/lite_test_protos-speed-src.srcjar",
# Don't include WKT from 25.x, due to bin incompatibility
#"v25.0_gencode/src_jars/any_proto-speed-src.srcjar",
# "v25.0_gencode/src_jars/api_proto-speed-src.srcjar",
# "v25.0_gencode/src_jars/descriptor_proto-speed-src.srcjar",
# "v25.0_gencode/src_jars/duration_proto-speed-src.srcjar",
# "v25.0_gencode/src_jars/empty_proto-speed-src.srcjar",
# "v25.0_gencode/src_jars/field_mask_proto-speed-src.srcjar",
# "v25.0_gencode/src_jars/source_context_proto-speed-src.srcjar",
# "v25.0_gencode/src_jars/struct_proto-speed-src.srcjar",
# "v25.0_gencode/src_jars/timestamp_proto-speed-src.srcjar",
# "v25.0_gencode/src_jars/type_proto-speed-src.srcjar",
# "v25.0_gencode/src_jars/wrappers_proto-speed-src.srcjar",
],
deps = ["//java/core:core"],
)
junit_tests(
name = "head_generated_message_test_srcjars",
size = "small",
srcs = [
"src/test/java/com/google/protobuf/GeneratedMessageTest.java",
],
data = ["//src/google/protobuf:testdata"],
deps = [
"@com_google_protobuf_head//java/core:core",
":25.0_gencode",
":test_util",
"@maven//:com_google_guava_guava",
"@maven//:com_google_truth_truth",
"@maven//:junit_junit",
"@maven//:org_mockito_mockito_core",
],
)
junit_tests(
name = "head_generated_message_test_binjars",
size = "small",
srcs = [
"src/test/java/com/google/protobuf/GeneratedMessageTest.java",
],
data = ["//src/google/protobuf:testdata"],
deps = [
"@com_google_protobuf_head//java/core:core",
":lib25.0_gencode.jar",
":test_util",
"@maven//:com_google_guava_guava",
"@maven//:com_google_truth_truth",
"@maven//:junit_junit",
"@maven//:org_mockito_mockito_core",
],
)
# The UTF-8 validation tests are much slower than the other tests, so they get
# their own test target with a longer timeout.
junit_tests(

Loading…
Cancel
Save