Skip to content

Commit 0cdbc0b

Browse files
mkruskal-googlecopybara-github
authored andcommitted
Internal changes
PiperOrigin-RevId: 756948087
1 parent bc5c75f commit 0cdbc0b

File tree

2 files changed

+123
-111
lines changed

2 files changed

+123
-111
lines changed

conformance/BUILD

Lines changed: 121 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -49,98 +49,8 @@ exports_files([
4949
"text_format_failure_list_python.txt",
5050
])
5151

52-
cc_proto_library(
53-
name = "test_messages_proto2_proto_cc",
54-
deps = ["//src/google/protobuf:test_messages_proto2_proto"],
55-
)
56-
57-
cc_proto_library(
58-
name = "test_messages_proto3_proto_cc",
59-
deps = ["//src/google/protobuf:test_messages_proto3_proto"],
60-
)
61-
62-
proto_library(
63-
name = "conformance_proto",
64-
srcs = ["conformance.proto"],
65-
visibility = ["//visibility:public"],
66-
)
67-
68-
cc_proto_library(
69-
name = "conformance_cc_proto",
70-
deps = [":conformance_proto"],
71-
)
72-
73-
internal_csharp_proto_library(
74-
name = "conformance_csharp_proto",
75-
srcs = ["conformance.proto"],
76-
visibility = [
77-
"//csharp:__subpackages__",
78-
],
79-
)
80-
81-
java_proto_library(
82-
name = "conformance_java_proto",
83-
visibility = [
84-
"//java:__subpackages__",
85-
],
86-
deps = [":conformance_proto"],
87-
)
88-
89-
java_lite_proto_library(
90-
name = "conformance_java_proto_lite",
91-
visibility = [
92-
"//java:__subpackages__",
93-
],
94-
deps = [":conformance_proto"],
95-
)
96-
97-
internal_objc_proto_library(
98-
name = "conformance_objc_proto",
99-
srcs = ["conformance.proto"],
100-
visibility = [
101-
"//conformance:__pkg__",
102-
"//objc:__pkg__",
103-
],
104-
)
105-
106-
internal_py_proto_library(
107-
name = "conformance_py_proto",
108-
srcs = ["conformance.proto"],
109-
srcs_version = "PY2AND3",
110-
visibility = [
111-
"//python:__subpackages__",
112-
],
113-
)
114-
115-
internal_php_proto_library(
116-
name = "conformance_php_proto",
117-
srcs = ["conformance.proto"],
118-
outs = [
119-
"Conformance/ConformanceRequest.php",
120-
"Conformance/ConformanceResponse.php",
121-
"Conformance/FailureSet.php",
122-
"Conformance/JspbEncodingConfig.php",
123-
"Conformance/TestCategory.php",
124-
"Conformance/WireFormat.php",
125-
"GPBMetadata/Conformance.php",
126-
],
127-
visibility = [
128-
"//conformance:__pkg__",
129-
"//php:__pkg__",
130-
],
131-
)
132-
133-
internal_ruby_proto_library(
134-
name = "conformance_ruby_proto",
135-
srcs = ["conformance.proto"],
136-
visibility = [
137-
"//conformance:__pkg__",
138-
"//ruby:__pkg__",
139-
],
140-
)
141-
14252
cc_library(
143-
name = "conformance_test",
53+
name = "conformance_test_lib",
14454
testonly = 1,
14555
srcs = [
14656
"conformance_test.cc",
@@ -151,16 +61,12 @@ cc_library(
15161
"conformance_test.h",
15262
"failure_list_trie_node.h",
15363
],
154-
includes = ["."],
15564
deps = [
15665
":conformance_cc_proto",
15766
"//src/google/protobuf",
15867
"//src/google/protobuf:descriptor_legacy",
15968
"//src/google/protobuf:endian",
160-
"//src/google/protobuf:protobuf_lite",
16169
"//src/google/protobuf/util:differencer",
162-
"//src/google/protobuf/util:json_util",
163-
"//src/google/protobuf/util:type_resolver",
16470
"@abseil-cpp//absl/container:btree",
16571
"@abseil-cpp//absl/container:flat_hash_set",
16672
"@abseil-cpp//absl/log:absl_check",
@@ -172,11 +78,22 @@ cc_library(
17278
],
17379
)
17480

81+
cc_library(
82+
name = "conformance_test_main",
83+
testonly = 1,
84+
srcs = ["conformance_test_main.cc"],
85+
deps = [
86+
":binary_json_conformance_suite",
87+
":conformance_test_lib",
88+
":text_format_conformance_suite",
89+
],
90+
)
91+
17592
cc_test(
17693
name = "failure_list_trie_node_test",
17794
srcs = ["failure_list_trie_node_test.cc"],
17895
deps = [
179-
":conformance_test",
96+
":conformance_test_lib",
18097
"@abseil-cpp//absl/status",
18198
"@abseil-cpp//absl/status:statusor",
18299
"@abseil-cpp//absl/strings",
@@ -189,7 +106,9 @@ cc_test(
189106
# Add more meta-testing here. This is not to be confused with a conformance test itself.
190107
test_suite(
191108
name = "conformance_framework_tests",
192-
tests = ["failure_list_trie_node_test"],
109+
tests = [
110+
"failure_list_trie_node_test",
111+
],
193112
)
194113

195114
cc_library(
@@ -199,13 +118,14 @@ cc_library(
199118
hdrs = ["binary_json_conformance_suite.h"],
200119
deps = [
201120
":conformance_cc_proto",
202-
":conformance_test",
203-
":test_messages_proto2_proto_cc",
204-
":test_messages_proto3_proto_cc",
121+
":conformance_test_lib",
122+
"//:test_messages_proto2_cc_proto",
123+
"//:test_messages_proto3_cc_proto",
205124
"//conformance/test_protos:test_messages_edition2023_cc_proto",
206125
"//editions:test_messages_proto2_editions_cc_proto",
207126
"//editions:test_messages_proto3_editions_cc_proto",
208127
"//src/google/protobuf",
128+
"//src/google/protobuf:endian",
209129
"//src/google/protobuf:protobuf_lite",
210130
"//src/google/protobuf/json",
211131
"//src/google/protobuf/util:type_resolver",
@@ -215,6 +135,7 @@ cc_library(
215135
"@abseil-cpp//absl/status",
216136
"@abseil-cpp//absl/strings",
217137
"@abseil-cpp//absl/strings:str_format",
138+
"@abseil-cpp//absl/strings:string_view",
218139
"@jsoncpp",
219140
],
220141
)
@@ -225,9 +146,9 @@ cc_library(
225146
srcs = ["text_format_conformance_suite.cc"],
226147
hdrs = ["text_format_conformance_suite.h"],
227148
deps = [
228-
":conformance_test",
229-
":test_messages_proto2_proto_cc",
230-
":test_messages_proto3_proto_cc",
149+
":conformance_test_lib",
150+
"//:test_messages_proto2_cc_proto",
151+
"//:test_messages_proto3_cc_proto",
231152
"//conformance/test_protos:test_messages_edition2023_cc_proto",
232153
"//editions:test_messages_proto2_editions_cc_proto",
233154
"//editions:test_messages_proto3_editions_cc_proto",
@@ -242,13 +163,104 @@ cc_library(
242163
cc_binary(
243164
name = "conformance_test_runner",
244165
testonly = 1,
245-
srcs = ["conformance_test_main.cc"],
246166
visibility = ["//visibility:public"],
247-
deps = [
248-
":binary_json_conformance_suite",
249-
":conformance_test",
250-
":text_format_conformance_suite",
251-
"@abseil-cpp//absl/strings:str_format",
167+
deps = [":conformance_test_main"],
168+
)
169+
170+
proto_library(
171+
name = "conformance_proto",
172+
srcs = ["conformance.proto"],
173+
visibility = ["//visibility:public"],
174+
)
175+
176+
cc_proto_library(
177+
name = "conformance_cc_proto",
178+
deps = [":conformance_proto"],
179+
)
180+
181+
java_proto_library(
182+
name = "conformance_java_proto",
183+
deps = [":conformance_proto"],
184+
)
185+
186+
java_lite_proto_library(
187+
name = "conformance_java_proto_lite",
188+
deps = [":conformance_proto"],
189+
)
190+
191+
exports_files([
192+
"bazel_conformance_test_runner.sh",
193+
"failure_list_cpp.txt",
194+
"failure_list_csharp.txt",
195+
"failure_list_java.txt",
196+
"failure_list_java_lite.txt",
197+
"failure_list_objc.txt",
198+
"failure_list_php.txt",
199+
"failure_list_php_c.txt",
200+
"failure_list_python.txt",
201+
"failure_list_python_cpp.txt",
202+
"failure_list_python_upb.txt",
203+
"failure_list_ruby.txt",
204+
"failure_list_jruby.txt",
205+
"failure_list_jruby_ffi.txt",
206+
"text_format_failure_list_cpp.txt",
207+
"text_format_failure_list_java.txt",
208+
"text_format_failure_list_java_lite.txt",
209+
"text_format_failure_list_php.txt",
210+
"text_format_failure_list_php_c.txt",
211+
"text_format_failure_list_python.txt",
212+
])
213+
214+
internal_csharp_proto_library(
215+
name = "conformance_csharp_proto",
216+
srcs = ["conformance.proto"],
217+
visibility = [
218+
"//csharp:__subpackages__",
219+
],
220+
)
221+
222+
internal_objc_proto_library(
223+
name = "conformance_objc_proto",
224+
srcs = ["conformance.proto"],
225+
visibility = [
226+
"//conformance:__pkg__",
227+
"//objc:__pkg__",
228+
],
229+
)
230+
231+
internal_py_proto_library(
232+
name = "conformance_py_proto",
233+
srcs = ["conformance.proto"],
234+
srcs_version = "PY2AND3",
235+
visibility = [
236+
"//python:__subpackages__",
237+
],
238+
)
239+
240+
internal_php_proto_library(
241+
name = "conformance_php_proto",
242+
srcs = ["conformance.proto"],
243+
outs = [
244+
"Conformance/ConformanceRequest.php",
245+
"Conformance/ConformanceResponse.php",
246+
"Conformance/FailureSet.php",
247+
"Conformance/JspbEncodingConfig.php",
248+
"Conformance/TestCategory.php",
249+
"Conformance/WireFormat.php",
250+
"GPBMetadata/Conformance.php",
251+
],
252+
visibility = [
253+
"//conformance:__pkg__",
254+
"//php:__pkg__",
255+
],
256+
)
257+
258+
internal_ruby_proto_library(
259+
name = "conformance_ruby_proto",
260+
srcs = ["conformance.proto"],
261+
visibility = [
262+
"//conformance:__pkg__",
263+
"//ruby:__pkg__",
252264
],
253265
)
254266

conformance/conformance_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
#include <string>
1919
#include <utility>
2020

21-
#include "google/protobuf/util/field_comparator.h"
22-
#include "google/protobuf/util/message_differencer.h"
2321
#include "absl/container/btree_map.h"
2422
#include "absl/container/flat_hash_set.h"
2523
#include "absl/log/absl_check.h"
@@ -34,6 +32,8 @@
3432
#include "google/protobuf/endian.h"
3533
#include "google/protobuf/message.h"
3634
#include "google/protobuf/text_format.h"
35+
#include "google/protobuf/util/field_comparator.h"
36+
#include "google/protobuf/util/message_differencer.h"
3737

3838
using conformance::ConformanceRequest;
3939
using conformance::ConformanceResponse;

0 commit comments

Comments
 (0)