Skip to content

Commit 829c1b2

Browse files
authored
BaseTools HostBasedUnittestRunner Modify CC_REORGANIZE to exclude Null implementations. (#1218)
## Description When Unit tests are run, the generated report includes null libraries in the calculation. Modifying the organize_coverage to exclude null libraries from the code coverage results. These changes only effect the case when CC_REORGANIZE is set to true in the project. - [x] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [x] Backport to release branch? ## How This Was Tested Ran on private repo which contained a lot of NULL libraries. Prior to change, Null libraries were included in the report, after the modification, they were not ## Integration Instructions No changes required, but coverage report will look different if CC_REORGANIZE is set to True.
1 parent ce81090 commit 829c1b2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import xml.etree.ElementTree
1313
from edk2toolext.environment.plugintypes.uefi_build_plugin import IUefiBuildPlugin
1414
from edk2toolext import edk2_logging
15-
import edk2toollib.windows.locate_tools as locate_tools
1615
from edk2toolext.environment import shell_environment
1716
from edk2toollib.utility_functions import RunCmd
1817
from edk2toollib.utility_functions import GetHostInfo
@@ -299,7 +298,7 @@ def organize_coverage(self, thebuilder) -> int:
299298
params += f" -p {package}" * int(package != "")
300299
params += " --full" * int(thebuilder.env.GetValue("CC_FULL", "FALSE") == "TRUE")
301300
params += " --flatten" * int(thebuilder.env.GetValue("CC_FLATTEN", "FALSE") == "TRUE")
302-
301+
params += " --exclude *NULL*,*Null*,*null*"
303302
return RunCmd("stuart_report", params)
304303

305304
def parse_workspace(self, thebuilder) -> str:

0 commit comments

Comments
 (0)