[P4-dev] p4c/testdata/p4_16_bmv_errors

hemant at mnkcg.com hemant at mnkcg.com
Sun Dec 9 09:54:21 EST 2018



Great script to install both p4c and behavioral-model!  


Since I already had p4c, I installed the behavioral-model and now my new test in p4c/testdata/p4_16_bmv_errors is picked up by ‘make check’ and the test passed.  The p4c/backends/bmv2/CMakeList.txt also includes some tests and it was confusing how the tests are run.  





From: Andy Fingerhut <andy.fingerhut at gmail.com> 
Sent: Sunday, December 09, 2018 1:13 AM
To: hemant at mnkcg.com
Cc: p4-dev <p4-dev at lists.p4.org>
Subject: Re: [P4-dev] p4c/testdata/p4_16_bmv_errors


I would strongly recommend downloading and building the behavioral-model repository if you are doing development on p4c, _because_ of the extra automated tests that are enabled when you build p4c after installing behavioral-model simple_switch.


If you want a script that starts with an Ubuntu 16.04 or 18.04 Linux system, with nothing else installed, and installs everything necessary to build behavioral-model and p4c, including their dependencies, this script works:




You can run the commands in it manually if you prefer, but I have used the script multiple times on new Ubuntu VMs without problems.




On Sat, Dec 8, 2018 at 6:26 PM <hemant at mnkcg.com <mailto:hemant at mnkcg.com> > wrote:

I only use p4c and do not download the behavioral-model repo on my machine.  With such a setup, when I added a new test P4 program to p4c/testdata/p4_16_bmv_errors, ‘make check’ does not pickup the test to run.  Since this P4 program is new, I invoked a ‘cmake ..’ , rebuilt p4c, and then tried ‘make check’ again.  


I think, only if one downloads the behavioral-model repo, then test cases in p4c/testdata/p4_16_bmv_errors run?  A short note related to how one is able to run a new test in p4c/testdata/p4_16_bmv_errors would be helpful. 






P4-dev mailing list
P4-dev at lists.p4.org <mailto:P4-dev at lists.p4.org> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20181209/d358fd00/attachment.html>

More information about the P4-dev mailing list