Skip to content

Harden CLI, fbuild, and import-compatibility test coverage (WP7) - #24

Closed
devin-ai-integration[bot] wants to merge 1 commit into
devin/wp6-cookiecutter-consolidationfrom
devin/wp7-test-hardening
Closed

devin-ai-integration[bot] wants to merge 1 commit into
devin/wp6-cookiecutter-consolidationfrom
devin/wp7-test-hardening

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Related Issue(s)
Has Unit Tests (y/n) y
Documentation Included (y/n) n

Change Description

Test-only PR; no src/ changes.

  • Deleted test/fprime/util/commands_unit_test.py (12 empty test bodies that only inflated counts).
  • Added test/fprime/util/test_util_cli.py: parse_args/dispatch coverage for the CLI surface (named test_util_cli.py because pytest rejects a second test_cli.py basename alongside test/fprime/fpp/test_cli.py).
  • Added mocked-subprocess fbuild tests: cmake auto-refresh retry, Gcovr argv construction, purge logic.
  • Added an import-compatibility test asserting the exact symbols external consumers use (IniSettings, Build, BuildType, is_valid_name, Target, FppUtility, U32Type) resolve from all old module paths in the WP8 mapping table — this is the safety net that must stay green through the WP8 reorganization. The fprime.common.models.serialize.* cases skip when fprime_gds is not installed (those shims re-export from it).

Rationale

WP7 of 9, stacked on #23. Locks in current behavior before WP8 moves modules.

Testing/Review Recommendations

221 passed + 9 skipped (vs 172 on base; the 9 skips are the fprime_gds-dependent cases); black clean.

Future Work

WP8 module reorganization, WP9 fpp_to_json disposition.

Pushed by Devin AI

Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/bba39c1277854bf8a1fd63a094f20e24
Requested by: @thomas-bc-autobot


Open in Devin Review

@devin-ai-integration

Copy link
Copy Markdown
Author
Original prompt from thomas.boyer.chammard

I want this session to be a large effort to make fprime-tools more maintainable and cleaner code/less technical debt. Please make a plan to study that and deliver a master plan. Allocate subagent to find areas that can be improved, then more subagents to study it in detail and make a plan, then iterate on the plan with other review agents until the review agent and planner agent agree on an approved plan. Once the approved plan is done, have other implementer agents implement the plan, and review agents that build and test the result. Iterate until everyone agrees the code is correct and an improvement. Use subagents, high importance goals:

  • CLI and external APIs should ideally be left unchanged, or backwards compatibility layer left in
  • The less line of code changes, the easier the review. But if lots of LOC for high value simplification, it is ok.

Let’s go! Don’t stop, keep iterating until my goals are met.

@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

- Delete test/fprime/util/commands_unit_test.py: 12 empty tests (bodies were
  literally 'pass'), inflating the reported count. Collected test count drops
  accordingly before rising with the additions below.
- Add test/fprime/util/test_util_cli.py: parse_args coverage for every command
  (namespace, -D handling, --jobs extraction, unknown-arg rejection) and
  utility_entry dispatch tests with mocked load_build.
- Add test/fprime/fbuild/test_fbuild_mocked.py: mocked-subprocess tests for the
  'No rule to make target' auto-refresh retry, Gcovr argv assembly, and purge
  force/confirm/missing-dir logic.
- Add test/fprime/test_import_compat.py: import-compatibility test asserting
  the specific symbols consumers use across all public module paths (module
  identity assertions deferred to WP8).

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/wp6-cookiecutter-consolidation branch from 8696b91 to 3f7ddca Compare August 28, 2026 16:31
@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/wp7-test-hardening branch from 4a7abbb to 6375fe7 Compare August 28, 2026 16:31
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.

1 participant