p4lang / tutorials

P4 language tutorials
Apache License 2.0
1.33k stars 878 forks source link

Test the programs in the exercises folder with PTF #528

Closed fengkeyleaf closed 11 months ago

fengkeyleaf commented 11 months ago

I wonder if we can write PTF tests to test the programs in the exercises folder? If it's possible, but how to do it? I looked into the README in PTF repositories. They mentioned how to run the example using p4Factory, which is already deprecated. And I don't get it how to do it for the programs in this tutorials. Any useful hints would be really helpful.

jafingerhut commented 11 months ago

There are some example PTF tests for some fairly simple BMv2 v1model P4 programs in another repository that you are welcome to look at as examples, here:

fengkeyleaf commented 11 months ago

There are some example PTF tests for some fairly simple BMv2 v1model P4 programs in another repository that you are welcome to look at as examples, here:

Thanks for the info!