I’ve worked through all the ECC issues with Variable Policy (AND the UnitTests) on this branch:

Commits · corthon/edk2 (github.com)

 

I even wrote the Main() entry point lib that Laszlo suggested (it works rather nicely):

TEMP: Staging for HostTest entry point · corthon/edk2@4ce5210 (github.com)

 

However, there’s one that I just can’t get past and I would like to take it up with the community. I don’t think that UnitTests should have to deal with the “can’t initialize variables in declaration” check. Almost none of the solutions that I tested worked, and the ones that did were too cumbersome. They failed on two key points that are important for test writing:

 

I would like to move for an exception for unit tests (or at least host-based unit tests), but I don’t know how to accomplish that from a technical standpoint.

 

Thoughts?

 

- Bret