Skip to content

Commit 6b922fc

Browse files
kishanpsbibhuprasad-hcl
authored andcommitted
[comb] Make pins depend on github.com/google/gutil
1 parent 983e8b2 commit 6b922fc

File tree

479 files changed

+1857
-6225
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

479 files changed

+1857
-6225
lines changed

'

Lines changed: 327 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,327 @@
1+
# Copyright 2024 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
16+
load("//p4_pdpi/testing:diff_test.bzl", "cmd_diff_test")
17+
18+
package(
19+
default_visibility = ["//visibility:public"],
20+
licenses = ["notice"],
21+
)
22+
23+
cc_library(
24+
name = "cpu_qos_test",
25+
testonly = True,
26+
srcs = [
27+
"cpu_qos_test.cc",
28+
],
29+
hdrs = [
30+
"cpu_qos_test.h",
31+
],
32+
deps = [
33+
":gnmi_parsers",
34+
":packet_in_receiver",
35+
":qos_test_util",
36+
"//lib:ixia_helper",
37+
"//lib/gnmi:gnmi_helper",
38+
"//lib/gnmi:openconfig_cc_proto",
39+
"//p4_pdpi:ir",
40+
"//p4_pdpi:ir_cc_proto",
41+
"//p4_pdpi:p4_runtime_session",
42+
"//p4_pdpi:p4_runtime_session_extras",
43+
"//p4_pdpi:pd",
44+
"//p4_pdpi/netaddr:ipv4_address",
45+
"//p4_pdpi/netaddr:ipv6_address",
46+
"//p4_pdpi/netaddr:mac_address",
47+
"//p4_pdpi/packetlib",
48+
"//p4_pdpi/packetlib:packetlib_cc_proto",
49+
"//sai_p4/instantiations/google:instantiations",
50+
"//sai_p4/instantiations/google:p4_versions",
51+
"//sai_p4/instantiations/google:sai_pd_cc_proto",
52+
"//sai_p4/instantiations/google/test_tools:test_entries",
53+
"//tests/forwarding:util",
54+
"//tests/integration/system/nsf:util",
55+
"//tests/integration/system/nsf/interfaces:testbed",
56+
"//tests/lib:switch_test_setup_helpers",
57+
"//tests/sflow:sflow_util",
58+
"//thinkit:generic_testbed",
59+
"//thinkit:generic_testbed_fixture",
60+
"//thinkit:mirror_testbed",
61+
"//thinkit:mirror_testbed_fixture",
62+
"//thinkit:ssh_client",
63+
"//thinkit:switch",
64+
"//thinkit/proto:generic_testbed_cc_proto",
65+
"@com_github_gnmi//proto/gnmi:gnmi_cc_grpc_proto",
66+
"@com_github_gnmi//proto/gnmi:gnmi_cc_proto",
67+
"@com_github_google_glog//:glog",
68+
"@com_github_p4lang_p4runtime//:p4info_cc_proto",
69+
"@com_github_p4lang_p4runtime//:p4runtime_cc_proto",
70+
"@com_google_absl//absl/base:core_headers",
71+
"@com_google_absl//absl/cleanup",
72+
"@com_google_absl//absl/container:flat_hash_map",
73+
"@com_google_absl//absl/container:flat_hash_set",
74+
"@com_google_absl//absl/flags:flag",
75+
"@com_google_absl//absl/status",
76+
"@com_google_absl//absl/status:statusor",
77+
"@com_google_absl//absl/strings",
78+
"@com_google_absl//absl/strings:str_format",
79+
"@com_google_absl//absl/synchronization",
80+
"@com_google_absl//absl/time",
81+
"@com_google_absl//absl/types:optional",
82+
"@com_google_absl//absl/types:variant",
83+
"@com_google_googletest//:gtest",
84+
"@com_google_protobuf//:protobuf",
85+
"@com_google_gutil//gutil:collections",
86+
"@com_google_gutil//gutil:proto",
87+
"@com_google_gutil//gutil:proto_matchers",
88+
"@com_google_gutil//gutil:status",
89+
"@com_google_gutil//gutil:status_matchers",
90+
"@com_google_gutil//gutil:testing",
91+
"@com_google_gutil//gutil:version",
92+
],
93+
alwayslink = True,
94+
)
95+
96+
cc_library(
97+
name = "punt_qos_test",
98+
testonly = True,
99+
srcs = [
100+
"punt_qos_test.cc",
101+
],
102+
hdrs = [
103+
"punt_qos_test.h",
104+
],
105+
deps = [
106+
":packet_in_receiver",
107+
":qos_test_util",
108+
"//lib:ixia_helper",
109+
"//lib/gnmi:gnmi_helper",
110+
"//lib/gnmi:openconfig_cc_proto",
111+
"//p4_pdpi:ir",
112+
"//p4_pdpi:ir_cc_proto",
113+
"//p4_pdpi:p4_runtime_session",
114+
"//p4_pdpi/netaddr:ipv4_address",
115+
"//p4_pdpi/netaddr:mac_address",
116+
"//p4_pdpi/packetlib:packetlib_cc_proto",
117+
"//sai_p4/instantiations/google:instantiations",
118+
"//sai_p4/instantiations/google:sai_pd_cc_proto",
119+
"//sai_p4/instantiations/google/test_tools:test_entries",
120+
"//tests/forwarding:util",
121+
"//tests/gnmi:util",
122+
"//tests/lib:switch_test_setup_helpers",
123+
"//thinkit:generic_testbed",
124+
"//thinkit:generic_testbed_fixture",
125+
"//thinkit:ssh_client",
126+
"//thinkit:switch",
127+
"//thinkit/proto:generic_testbed_cc_proto",
128+
"@com_github_gnmi//proto/gnmi:gnmi_cc_grpc_proto",
129+
"@com_github_gnmi//proto/gnmi:gnmi_cc_proto",
130+
"@com_github_google_glog//:glog",
131+
"@com_github_p4lang_p4runtime//:p4info_cc_proto",
132+
"@com_github_p4lang_p4runtime//:p4runtime_cc_proto",
133+
"@com_google_absl//absl/base:core_headers",
134+
"@com_google_absl//absl/container:flat_hash_map",
135+
"@com_google_absl//absl/container:flat_hash_set",
136+
"@com_google_absl//absl/flags:flag",
137+
"@com_google_absl//absl/status",
138+
"@com_google_absl//absl/status:statusor",
139+
"@com_google_absl//absl/strings",
140+
"@com_google_absl//absl/strings:str_format",
141+
"@com_google_absl//absl/synchronization",
142+
"@com_google_absl//absl/time",
143+
"@com_google_absl//absl/types:optional",
144+
"@com_google_googletest//:gtest",
145+
"@com_google_gutil//gutil:collections",
146+
"@com_google_gutil//gutil:status",
147+
"@com_google_gutil//gutil:status_matchers",
148+
"@com_google_gutil//gutil:testing",
149+
],
150+
alwayslink = True,
151+
)
152+
153+
cc_library(
154+
name = "pfc_test",
155+
testonly = True,
156+
srcs = ["pfc_test.cc"],
157+
hdrs = ["pfc_test.h"],
158+
deps = [
159+
":qos_test_util",
160+
"//lib:ixia_helper",
161+
"//lib/gnmi:gnmi_helper",
162+
"//p4_pdpi:p4_runtime_session",
163+
"//p4_pdpi/netaddr:ipv4_address",
164+
"//p4_pdpi/netaddr:mac_address",
165+
"//p4_pdpi/packetlib:packetlib_cc_proto",
166+
"//sai_p4/instantiations/google/test_tools:test_entries",
167+
"//tests/forwarding:util",
168+
"//tests/lib:switch_test_setup_helpers",
169+
"//thinkit:generic_testbed",
170+
"//thinkit:generic_testbed_fixture",
171+
"//thinkit:ssh_client",
172+
"//thinkit:switch",
173+
"//thinkit/proto:generic_testbed_cc_proto",
174+
"@com_github_gnmi//proto/gnmi:gnmi_cc_grpc_proto",
175+
"@com_github_google_glog//:glog",
176+
"@com_google_absl//absl/algorithm:container",
177+
"@com_google_absl//absl/container:flat_hash_map",
178+
"@com_google_absl//absl/status",
179+
"@com_google_absl//absl/strings",
180+
"@com_google_absl//absl/strings:str_format",
181+
"@com_google_absl//absl/strings:string_view",
182+
"@com_google_absl//absl/time",
183+
"@com_google_googletest//:gtest",
184+
"@com_google_gutil//gutil:collections",
185+
"@com_google_gutil//gutil:status",
186+
"@com_google_gutil//gutil:status_matchers",
187+
"@com_google_gutil//gutil:testing",
188+
],
189+
alwayslink = True,
190+
)
191+
192+
cc_library(
193+
name = "frontpanel_qos_test",
194+
testonly = True,
195+
srcs = ["frontpanel_qos_test.cc"],
196+
hdrs = ["frontpanel_qos_test.h"],
197+
deps = [
198+
":packet_in_receiver",
199+
":qos_test_util",
200+
"//lib:ixia_helper",
201+
"//lib:ixia_helper_cc_proto",
202+
"//lib/gnmi:gnmi_helper",
203+
"//lib/utils:json_utils",
204+
"//lib/validator:validator_lib",
205+
"//p4_pdpi:ir",
206+
"//p4_pdpi:ir_cc_proto",
207+
"//p4_pdpi:p4_runtime_session",
208+
"//p4_pdpi:p4_runtime_session_extras",
209+
"//p4_pdpi:pd",
210+
"//p4_pdpi/internal:ordered_map",
211+
"//p4_pdpi/netaddr:ipv4_address",
212+
"//p4_pdpi/netaddr:ipv6_address",
213+
"//p4_pdpi/netaddr:mac_address",
214+
"//p4_pdpi/packetlib",
215+
"//p4_pdpi/packetlib:packetlib_cc_proto",
216+
"//sai_p4/instantiations/google:sai_pd_cc_proto",
217+
"//sai_p4/instantiations/google/test_tools:test_entries",
218+
"//tests/forwarding:util",
219+
"//tests/integration/system/nsf:util",
220+
"//tests/integration/system/nsf/interfaces:testbed",
221+
"//tests/lib:switch_test_setup_helpers",
222+
"//thinkit:generic_testbed",
223+
"//thinkit:generic_testbed_fixture",
224+
"//thinkit:mirror_testbed",
225+
"//thinkit:ssh_client",
226+
"//thinkit:switch",
227+
"@com_github_gnmi//proto/gnmi:gnmi_cc_grpc_proto",
228+
"@com_github_p4lang_p4runtime//:p4info_cc_proto",
229+
"@com_github_p4lang_p4runtime//:p4runtime_cc_proto",
230+
"@com_google_absl//absl/algorithm:container",
231+
"@com_google_absl//absl/cleanup",
232+
"@com_google_absl//absl/container:btree",
233+
"@com_google_absl//absl/container:flat_hash_map",
234+
"@com_google_absl//absl/container:flat_hash_set",
235+
"@com_google_absl//absl/status",
236+
"@com_google_absl//absl/strings",
237+
"@com_google_absl//absl/strings:str_format",
238+
"@com_google_absl//absl/time",
239+
"@com_google_absl//absl/types:optional",
240+
"@com_google_googletest//:gtest",
241+
"@com_google_gutil//gutil:collections",
242+
"@com_google_gutil//gutil:proto",
243+
"@com_google_gutil//gutil:status",
244+
"@com_google_gutil//gutil:status_matchers",
245+
"@com_google_gutil//gutil:testing",
246+
],
247+
alwayslink = True,
248+
)
249+
250+
cc_library(
251+
name = "gnmi_parsers",
252+
srcs = ["gnmi_parsers.cc"],
253+
hdrs = ["gnmi_parsers.h"],
254+
deps = [
255+
"//lib/gnmi:openconfig_cc_proto",
256+
"//p4_pdpi/netaddr:ipv4_address",
257+
"//p4_pdpi/netaddr:ipv6_address",
258+
"@com_google_absl//absl/container:flat_hash_map",
259+
"@com_google_absl//absl/status",
260+
"@com_google_absl//absl/status:statusor",
261+
"@com_google_absl//absl/strings",
262+
"@com_google_gutil//gutil:proto",
263+
],
264+
)
265+
266+
# go/golden-test-with-coverage
267+
cc_test(
268+
name = "gnmi_parsers_test_runner",
269+
srcs = ["gnmi_parsers_test_runner.cc"],
270+
linkstatic = True,
271+
deps = [
272+
":gnmi_parsers",
273+
"//p4_pdpi/internal:ordered_map",
274+
"@com_google_absl//absl/container:flat_hash_map",
275+
"@com_google_absl//absl/status:statusor",
276+
"@com_google_absl//absl/strings",
277+
"@com_google_protobuf//:protobuf",
278+
"@com_google_gutil//gutil:proto",
279+
"@com_google_gutil//gutil:status",
280+
],
281+
)
282+
283+
cmd_diff_test(
284+
name = "gnmi_parsers_test",
285+
actual_cmd = "$(execpath :gnmi_parsers_test_runner)",
286+
expected = ":gnmi_parsers_test.expected.output",
287+
tools = [":gnmi_parsers_test_runner"],
288+
)
289+
290+
cc_library(
291+
name = "qos_test_util",
292+
srcs = ["qos_test_util.cc"],
293+
hdrs = ["qos_test_util.h"],
294+
deps = [
295+
":gnmi_parsers",
296+
"//lib/gnmi:gnmi_helper",
297+
"//lib/gnmi:openconfig_cc_proto",
298+
"//lib/utils:json_utils",
299+
"//sai_p4/instantiations/google:sai_pd_cc_proto",
300+
"//thinkit:mirror_testbed",
301+
"//thinkit/proto:generic_testbed_cc_proto",
302+
"@com_github_gnmi//proto/gnmi:gnmi_cc_grpc_proto",
303+
"@com_github_gnmi//proto/gnmi:gnmi_cc_proto",
304+
"@com_github_nlohmann_json//:nlohmann_json",
305+
"@com_google_absl//absl/container:flat_hash_map",
306+
"@com_google_absl//absl/container:flat_hash_set",
307+
"@com_google_absl//absl/status",
308+
"@com_google_absl//absl/status:statusor",
309+
"@com_google_absl//absl/strings",
310+
"@com_google_absl//absl/strings:str_format",
311+
"@com_google_absl//absl/time",
312+
"@com_google_protobuf//:protobuf",
313+
"@com_google_gutil//gutil:collections",
314+
"@com_google_gutil//gutil:proto",
315+
"@com_google_gutil//gutil:status",
316+
],
317+
)
318+
319+
cc_library(
320+
name = "packet_in_receiver",
321+
hdrs = ["packet_in_receiver.h"],
322+
deps = [
323+
"//p4_pdpi:p4_runtime_session",
324+
"@com_google_absl//absl/synchronization",
325+
"@com_google_absl//absl/time",
326+
],
327+
)

WORKSPACE.bazel

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ rules_proto_grpc_toolchains()
107107

108108
rules_proto_grpc_repos()
109109

110+
# -- Load GUtil -----------------------------------------------------------------
111+
112+
load("@com_google_gutil//:gutil_deps.bzl", "gutil_deps")
113+
114+
gutil_deps()
115+
110116
# -- Load P4Runtime ------------------------------------------------------------
111117

112118
load("@com_github_p4lang_p4runtime//:p4runtime_deps.bzl", "p4runtime_deps")

0 commit comments

Comments
 (0)