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

Sort generated PD functions #82

Closed sethfowler closed 7 years ago

sethfowler commented 7 years ago

We're currently working on making it possible to generate PD interfaces from P4Runtime. It's difficult to compare the output of that code path with p4c-bm's output, though, because each code path stores their data in hash tables which cause the resulting PD functions to be ordered more or less randomly.

This PR fixes this problem by sorting p4c-bm's PD output. That way, diff is enough to compare to the two code paths.

codecov-io commented 7 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@8f4abea). Click here to learn what that means. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #82   +/-   ##
=========================================
  Coverage          ?   97.13%           
=========================================
  Files             ?       10           
  Lines             ?     1677           
  Branches          ?        0           
=========================================
  Hits              ?     1629           
  Misses            ?       48           
  Partials          ?        0
Impacted Files Coverage Δ
p4c_bm/gen_pd.py 92.38% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8f4abea...78e165b. Read the comment docs.

sethfowler commented 7 years ago

@antoninbas It looks like I can't merge this PR because of some issue with codecov. Could you please merge it?