Skip to content

Commit 6c18835

Browse files
authored
Update CoverageReport exclude statement to target folders Test, UnitTest instead of anything with the word Test in it. (#995)
Original statement would exclude anything with Test in the path name, which ended up targeting a source file with DramTest in the name. Updated the statement to exclude /Test/ and /UnitTest/ in the path name, would should exclude items from under the common unit test folders. Tested on Package which was previously missing some test results. After updating missing test results were correctly reorganized.
1 parent 7a7433e commit 6c18835

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

edk2toolext/environment/reporttypes/coverage_report.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ def build_report(self, session: Session, env_id: int, source_coverage_dict: dict
329329

330330
packages = ET.SubElement(root, "packages")
331331
for path, source_list in inf_source_dict.items():
332-
if fnmatch.fnmatch(path, "*Test*"):
332+
# Exclude sources file that exists under a Test or UnitTest folder
333+
if fnmatch.fnmatch(path, "*/Test/*") or fnmatch.fnmatch(path, "*/UnitTest/*"):
333334
continue
334335
if not source_list:
335336
continue

0 commit comments

Comments
 (0)