Skip to content

SourceTable: Filter directories from source file glob results#797

Merged
Javagedes merged 1 commit intotianocore:masterfrom
Flickdm:fix/code_cov
Mar 30, 2026
Merged

SourceTable: Filter directories from source file glob results#797
Javagedes merged 1 commit intotianocore:masterfrom
Flickdm:fix/code_cov

Conversation

@Flickdm
Copy link
Copy Markdown
Contributor

@Flickdm Flickdm commented Mar 30, 2026

Path.rglob("*.c") matches both files and directories. When a submodule contains a directory whose name ends with a source extension (e.g. oqs-provider/oqs-template/oqsprov/oqs_kmgmt.c), _parse_file() raises IsADirectoryError because it attempts to open() the directory path.

This becomes a problem trying to test against large third party vendored code (e.g. Openssl).

Add a file.is_file() guard to the existing filter so only regular files are passed to _parse_file().

Path.rglob("*.c") matches both files and directories. When a
submodule contains a directory whose name ends with a source
extension (e.g. oqs-provider/oqs-template/oqsprov/oqs_kmgmt.c),
_parse_file() raises IsADirectoryError because it attempts to
open() the directory path.

Add a file.is_file() guard to the existing filter so only regular
files are passed to _parse_file().

Signed-off-by: Doug Flick <dougflick@microsoft.com>
@Flickdm Flickdm requested a review from Javagedes March 30, 2026 21:08
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.10%. Comparing base (9b9fda2) to head (6d612b6).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #797   +/-   ##
=======================================
  Coverage   82.10%   82.10%           
=======================================
  Files          47       47           
  Lines        7881     7881           
=======================================
  Hits         6471     6471           
  Misses       1410     1410           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Javagedes Javagedes added this to the v0.23.12 milestone Mar 30, 2026
@Javagedes Javagedes merged commit 1f9255c into tianocore:master Mar 30, 2026
14 checks passed
@Flickdm Flickdm deleted the fix/code_cov branch March 30, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants