p4c icon indicating copy to clipboard operation
p4c copied to clipboard

[P4Testgen] Initialize the testgen targets when invoking the library API

Open fruffy opened this issue 1 year ago • 1 comments

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.

fruffy avatar Jun 04 '24 14:06 fruffy

Depends on #4728.

fruffy avatar Jul 01 '24 14:07 fruffy

@vlstill This passes now after #4728 has been merged.

fruffy avatar Jul 25 '24 17:07 fruffy