Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[P4Testgen] Add support for @format annotations in P4 programs for protobuf-ir tests #4276

Merged
merged 4 commits into from
Dec 27, 2023

Conversation

fruffy-g
Copy link
Contributor

@fruffy-g fruffy-g commented Dec 7, 2023

P4 SAI annotations such as @format dictate a specific format, which must be respected by P4Testgen when generating Protobuf PDPI tests. Hence, we add a couple utility functions to the Protobuf PDPI test back end to produce the right format in the case that a key has such an annotation.

Fixes #4273.

@fruffy-g fruffy-g force-pushed the fruffy/sai_tests branch 2 times, most recently from 7ba119f to a06a95a Compare December 7, 2023 16:15
@fruffy-g fruffy-g marked this pull request as ready for review December 15, 2023 17:29
@fruffy fruffy added the p4tools Topics related to the P4Tools back end label Dec 18, 2023
Copy link
Member

@smolkaj smolkaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits, otherwise LGTM.

@fruffy fruffy merged commit 30fc208 into p4lang:main Dec 27, 2023
13 checks passed
@fruffy-g fruffy-g deleted the fruffy/sai_tests branch February 15, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p4tools Topics related to the P4Tools back end
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[P4Testgen] Respect SAI annotations when generating Protobuf tests
3 participants