Skip to content

Commit

Permalink
[Dvaas]: Adding expected tests output to user-provided test vectors. (s…
Browse files Browse the repository at this point in the history
…onic-net#747)



Co-authored-by: kheradmandG <[email protected]>
Co-authored-by: kishanps <[email protected]>
  • Loading branch information
3 people authored Nov 21, 2024
1 parent 62d598a commit b1d2d69
Show file tree
Hide file tree
Showing 2 changed files with 543 additions and 16 deletions.
26 changes: 10 additions & 16 deletions dvaas/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -296,20 +296,14 @@ cc_test(
],
)

cc_library(
name = "user_provided_packet_test_vector",
testonly = True,
srcs = ["user_provided_packet_test_vector.cc"],
hdrs = ["user_provided_packet_test_vector.h"],
deps = [
":test_vector",
":test_vector_cc_proto",
"//gutil:proto",
"//gutil:status",
"//p4_pdpi/packetlib",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
],
cmd_diff_test(
name = "user_provided_packet_test_vector_diff_test",
actual_cmd = " | ".join([
"$(execpath :user_provided_packet_test_vector_test)",
# Strip unnecessary lines for golden testing.
"sed '1,/^\\[ RUN/d'", # Strip everything up to a line beginning with '[ RUN'.
"sed '/^\\[/d'", # Strip every line beginning with '['.
]),
expected = "user_provided_packet_test_vector_test.expected",
tools = [":user_provided_packet_test_vector_test"],
)
Loading

0 comments on commit b1d2d69

Please sign in to comment.