p4c
p4c copied to clipboard
[P4Testgen] Initialize the testgen targets when invoking the library API
This is a problem that was not caught in testing.
The failure isn't caught by the tests because of a nasty side effect of static allocation. gtest initializes the target at some point for another tests and it remains initialized for the tests that should fail.
https://github.com/p4lang/p4c/issues/4286 is relevant here.
Depends on #4728.
@vlstill This passes now after #4728 has been merged.