-
Notifications
You must be signed in to change notification settings - Fork 79
Multiple preparations for extended testing #285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
c808d05
Add initial plan for Clean Architecture refactor of firmware
andre-stefanov 0ec03b2
Potential fix for pull request finding
andre-stefanov d99f551
Multiple preparations for extended testing
andre-stefanov 2c957bb
Merge branch 'develop' into feature/fff-testing
ClutchplateDude 6d2e02c
Potential fix for pull request finding
andre-stefanov 5b9b44d
Add formatting scripts and update configuration for code style enforc…
andre-stefanov 8cc00d7
Add setup and teardown functions for unit tests in test_MappedDict
andre-stefanov 264ebce
Update clang-format version 20 and remove source/exclude options in w…
andre-stefanov 3c5049e
refactor: update clang-format workflow and improve formatting detection
andre-stefanov 046663c
restored code_format.yml to develop
andre-stefanov 2eb26d9
Merge branch 'develop' into feature/fff-testing
andre-stefanov 43f1b9c
fix: revert clang-format version to 18 in workflow
andre-stefanov 51643c5
Merge branch 'develop' into feature/fff-testing
andre-stefanov 0940c04
style: apply clang-format fixes
openastrotech-bot a2bcb67
refactor: remove gcovr.cfg and native_coverage.py, update test-covera…
andre-stefanov 3397ff7
chore: remove coverage reporting instructions from README.md
andre-stefanov c484979
chore: remove unused coverage_html.sh and format.sh scripts
andre-stefanov 2370c87
refactor: update build flags and enhance coverage reporting in test-c…
andre-stefanov c9a565e
Merge branch 'develop' into feature/fff-testing
andre-stefanov 22ee187
ci: update GitHub Actions to use latest versions of checkout and setu…
andre-stefanov 856f8ca
ci: specify Python version in setup step for consistency
andre-stefanov 014afa3
chore: update Changelog for version 1.13.20 with CI adjustments, depe…
andre-stefanov 2450d43
chore: update version number to V1.13.20
andre-stefanov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| **/*.md | ||
|
|
||
| .github | ||
| .pio | ||
| .vscode | ||
| build_cache | ||
|
|
||
| scripts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,3 +11,6 @@ build_cache | |
|
|
||
| Configuration_local* | ||
| MeadeToWikiOutput.txt | ||
|
|
||
| # macOS | ||
| **/.DS_Store | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| import os | ||
| import subprocess | ||
| from pathlib import Path | ||
| import sys | ||
| from typing import TYPE_CHECKING, Any | ||
|
|
||
| if TYPE_CHECKING: | ||
| def Import(*names: str) -> tuple[Any, ...]: | ||
| ... | ||
|
|
||
| def _project_root(): | ||
| return Path(__file__).resolve().parent.parent | ||
|
|
||
|
|
||
| def _native_build_dir(): | ||
| return _project_root() / ".pio" / "build" / "native" | ||
|
|
||
|
|
||
| def _has_coverage_data(): | ||
| return any(_native_build_dir().rglob("*.gcda")) | ||
|
|
||
|
|
||
| def ensure_gcovr_installed(build_env): | ||
| """Checks if gcovr is installed, and installs it via pip if not.""" | ||
| try: | ||
| import gcovr | ||
| except ImportError: | ||
| print("gcovr not found! Installing it into the PlatformIO environment...") | ||
| # $PYTHONEXE ensures we use PlatformIO's isolated Python environment, not the system OS Python | ||
| build_env.Execute("$PYTHONEXE -m pip install gcovr") | ||
|
|
||
|
|
||
| def generateCoverageInfo(): | ||
| if not _has_coverage_data(): | ||
| print("Skipping coverage report generation because no .gcda files were produced.") | ||
| return | ||
|
|
||
| print("Generating code coverage report...") | ||
| gcovr_cmd = ["gcovr"] | ||
| report_dir = _project_root() | ||
| # Adjust this path if you are testing multiple specific folders | ||
| subprocess.run(gcovr_cmd + ["--html-details", ".pio/coverage.html", "--filter", "src/"], check=True, cwd=report_dir) | ||
| print(f"Coverage report generated at: .pio/coverage.html") | ||
| subprocess.run(gcovr_cmd + ["--markdown", ".pio/coverage.md", "--filter", "src/"], check=True, cwd=report_dir) | ||
| print(f"Coverage report generated at: .pio/coverage.md") | ||
|
|
||
|
|
||
| def configure_build(): | ||
| Import("env") | ||
| build_env = globals()["env"] | ||
| build_env.Append(LINKFLAGS=["--coverage"]) | ||
| ensure_gcovr_installed(build_env) | ||
|
|
||
|
|
||
| def main(argv): | ||
| if not argv: | ||
| print("Usage: test-coverage.py <test-program> [args...]", file=sys.stderr) | ||
| return 2 | ||
|
|
||
| completed = subprocess.run(argv, cwd=_project_root(), env=os.environ.copy(), check=False) | ||
| generateCoverageInfo() | ||
| return completed.returncode | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| raise SystemExit(main(sys.argv[1:])) | ||
|
|
||
| configure_build() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| TimerInterrupt/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| fff.h | ||
|
andre-stefanov marked this conversation as resolved.
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.