p4lang / ptf

Packet Test Framework
Apache License 2.0
146 stars 99 forks source link

Add coverage to requirements-dev.txt and enable it at pipeline #164

Open NexSabre opened 2 years ago

NexSabre commented 2 years ago

Coverage check at the pipeline, will fail under 28%.

Checking coverage...
python -m coverage report --fail-under=28
Name                            Stmts   Miss  Cover
---------------------------------------------------
src/ptf/__init__.py                27     17    37%
src/ptf/afpacket.py                50     28    44%
src/ptf/base_tests.py              20     20     0%
src/ptf/dataplane.py              488    349    28%
src/ptf/mask.py                    70     24    66%
src/ptf/netutils.py                26     11    58%
src/ptf/packet.py                   9      1    89%
src/ptf/packet_scapy.py           121     23    81%
src/ptf/parse.py                   40     33    18%
src/ptf/pcap_writer.py             24     14    42%
src/ptf/platforms/__init__.py       0      0   100%
src/ptf/platforms/dummy.py          2      2     0%
src/ptf/platforms/eth.py            7      7     0%
src/ptf/platforms/local.py          9      9     0%
src/ptf/platforms/nn.py             6      6     0%
src/ptf/platforms/remote.py         4      4     0%
src/ptf/ptfutils.py                64     41    36%
src/ptf/testutils.py              855    701    18%
src/ptf/thriftutils.py             70     70     0%
---------------------------------------------------
TOTAL                            1892   1360    28%
NexSabre commented 2 years ago

@saynb @slicking @antoninbas can I please you for review?