@@ -49,98 +49,8 @@ exports_files([
49
49
"text_format_failure_list_python.txt" ,
50
50
])
51
51
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
-
142
52
cc_library (
143
- name = "conformance_test " ,
53
+ name = "conformance_test_lib " ,
144
54
testonly = 1 ,
145
55
srcs = [
146
56
"conformance_test.cc" ,
@@ -151,16 +61,12 @@ cc_library(
151
61
"conformance_test.h" ,
152
62
"failure_list_trie_node.h" ,
153
63
],
154
- includes = ["." ],
155
64
deps = [
156
65
":conformance_cc_proto" ,
157
66
"//src/google/protobuf" ,
158
67
"//src/google/protobuf:descriptor_legacy" ,
159
68
"//src/google/protobuf:endian" ,
160
- "//src/google/protobuf:protobuf_lite" ,
161
69
"//src/google/protobuf/util:differencer" ,
162
- "//src/google/protobuf/util:json_util" ,
163
- "//src/google/protobuf/util:type_resolver" ,
164
70
"@abseil-cpp//absl/container:btree" ,
165
71
"@abseil-cpp//absl/container:flat_hash_set" ,
166
72
"@abseil-cpp//absl/log:absl_check" ,
@@ -172,11 +78,22 @@ cc_library(
172
78
],
173
79
)
174
80
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
+
175
92
cc_test (
176
93
name = "failure_list_trie_node_test" ,
177
94
srcs = ["failure_list_trie_node_test.cc" ],
178
95
deps = [
179
- ":conformance_test " ,
96
+ ":conformance_test_lib " ,
180
97
"@abseil-cpp//absl/status" ,
181
98
"@abseil-cpp//absl/status:statusor" ,
182
99
"@abseil-cpp//absl/strings" ,
@@ -189,7 +106,9 @@ cc_test(
189
106
# Add more meta-testing here. This is not to be confused with a conformance test itself.
190
107
test_suite (
191
108
name = "conformance_framework_tests" ,
192
- tests = ["failure_list_trie_node_test" ],
109
+ tests = [
110
+ "failure_list_trie_node_test" ,
111
+ ],
193
112
)
194
113
195
114
cc_library (
@@ -199,13 +118,14 @@ cc_library(
199
118
hdrs = ["binary_json_conformance_suite.h" ],
200
119
deps = [
201
120
":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 " ,
205
124
"//conformance/test_protos:test_messages_edition2023_cc_proto" ,
206
125
"//editions:test_messages_proto2_editions_cc_proto" ,
207
126
"//editions:test_messages_proto3_editions_cc_proto" ,
208
127
"//src/google/protobuf" ,
128
+ "//src/google/protobuf:endian" ,
209
129
"//src/google/protobuf:protobuf_lite" ,
210
130
"//src/google/protobuf/json" ,
211
131
"//src/google/protobuf/util:type_resolver" ,
@@ -215,6 +135,7 @@ cc_library(
215
135
"@abseil-cpp//absl/status" ,
216
136
"@abseil-cpp//absl/strings" ,
217
137
"@abseil-cpp//absl/strings:str_format" ,
138
+ "@abseil-cpp//absl/strings:string_view" ,
218
139
"@jsoncpp" ,
219
140
],
220
141
)
@@ -225,9 +146,9 @@ cc_library(
225
146
srcs = ["text_format_conformance_suite.cc" ],
226
147
hdrs = ["text_format_conformance_suite.h" ],
227
148
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 " ,
231
152
"//conformance/test_protos:test_messages_edition2023_cc_proto" ,
232
153
"//editions:test_messages_proto2_editions_cc_proto" ,
233
154
"//editions:test_messages_proto3_editions_cc_proto" ,
@@ -242,13 +163,104 @@ cc_library(
242
163
cc_binary (
243
164
name = "conformance_test_runner" ,
244
165
testonly = 1 ,
245
- srcs = ["conformance_test_main.cc" ],
246
166
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__" ,
252
264
],
253
265
)
254
266
0 commit comments