Open jafingerhut opened 6 months ago
Yes, this is a limitation of the Python STF runner, not P4Testgen. P4Testgen only requires that state is being reset between tests.
I see two ways to fix this.
Change P4Testgen to consolidate all tests into a single STF file and make it reset switch state between each single tests. This will require adding a reset command to STF, similar to how PTF works.
Just add an option to the run-bmv2-test.py
to take multiple tests as input. Only compile once but reinstantiate the switch between each test.
I have run a test like this manually after building p4c:
From the output it appears to behave as follows:
Thus it seems to compile the P4 program 10 times.
It seems like it should be straightforward to run such a test in a way that it compiles the P4 program only once, true?