mu_plus icon indicating copy to clipboard operation
mu_plus copied to clipboard

[Feature]: Remove dependency on UnitTestFrameworkPkg's IncludePrivate path.

Open apop5 opened this issue 1 year ago • 1 comments

Feature Overview

DxeMemoryProtectionApp and XmlSupportPkg\Library\UnitTestResultReportJUnitFormatLib\UnitTestResultReportLib.inf are both making use of internal header files from the UnitTestFrameworkPkg.

DxeMemoryProtectionApp is consuming UnitTestFrameworkTypes.h.

UnitTestResultReportLib.inf (XmlSupportPkg\Library\UnitTestResultReportJUnitFormatLib) is using UnitTestResultReportLib.h

These need to be examined and possibly removed.

Solution Overview

Enable tests to run without the need to use internals of the UnitTestFrameworkPkg.

Alternatives Considered

No response

Urgency

Low

Are you going to implement the feature request?

I will implement the feature

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

No response

apop5 avatar Jul 23 '24 20:07 apop5

There is a related conversation in an edk2 PR (filed by myself) https://github.com/tianocore/edk2/pull/11478

Copying the latest comment (from @mdkinney) on the PR here:

If the goal is to support custom report libraries outside the UnitTestFrameworkPkg, then I think new APIs are required in the UnitTestLib. The UnitTestLib today supports creating and registering and running unit tests and provides macros/functions to implement unit tests. It does not provide services to collect the results from unit tests after they have been run. The one implementation of UnitTestResultReportLib in the UnitTestFrameworkPkg has to know the internal structures to collect results.

Can you propose to API additions to the UnitTestLib that would allow all the registered unit tests to be traversed and collect the test results? I think that would be a great improvement that would allow many different unit test results report generators.

I'm not sure how Microsoft mu_plus had planned to resolve this, but I wanted to make sure that the ideas are connected between edk2 and the Microsoft repositories.

trhpx avatar Sep 25 '25 17:09 trhpx