p4lang / p4c-bm

Generates the JSON configuration for the behavioral-model (bmv2), as well as the C/C++ PD code
Apache License 2.0
24 stars 29 forks source link

JSON gen: Initial support to externs #62

Closed engjefersonsantiago closed 8 years ago

engjefersonsantiago commented 8 years ago

Hi all,

I added a proposal for the extern json arrays generation. The tests were made by modifying the simple_switch to use two externs.

Thanks. Jeferson

antoninbas commented 8 years ago

Both Travis tests (style and functionality) are failing. For style see: https://travis-ci.org/p4lang/p4c-bm/jobs/158747044 For functionality: all references to extern need to be wrapped in a "p4 v1.1" check, as the compiler is supposed to work for both versions of P4. See dump_actions function for an example. The code coverage test is also likely to failed once the Travis tests pass. You will need to add a test program under tests/p4_programs/v1_1/ which will exercise the extern support. Keep it concise but make sure it covers all your new code (save for error handling code).

codecov-io commented 8 years ago

Current coverage is 96.50% (diff: 100%)

Merging #62 into master will increase coverage by 0.07%

@@             master        #62   diff @@
==========================================
  Files            10         10          
  Lines          1458       1489    +31   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           1406       1437    +31   
  Misses           52         52          
  Partials          0          0          

Powered by Codecov. Last update 550005f...9788340

antoninbas commented 8 years ago

Hi Jeferson. I think the changes look great. I made 3 additional minor comments. Once you address them, I will merge the PR.

antoninbas commented 8 years ago

ready to merge, waiting on CLA

antoninbas commented 8 years ago

merged into master manually