Skip to content

fix: resolve in-container ctest script from env before importing the CLI#200

Merged
wyli merged 1 commit into
mainfrom
fix/ctest-script-env-first
Jul 13, 2026
Merged

fix: resolve in-container ctest script from env before importing the CLI#200
wyli merged 1 commit into
mainfrom
fix/ctest-script-env-first

Conversation

@wyli

@wyli wyli commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

The in-container ctest -S argument imported holoscan_cli just to locate the ctest script, so test failed in images without an importable CLI even though HOLOSCAN_CLI_CTEST_SCRIPT is already forwarded into the container. Use the forwarded env value first and keep the import only as the fallback.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Improved containerized test execution by resolving the CTest script path at runtime.
    • Respects the configured HOLOSCAN_CLI_CTEST_SCRIPT value, with a fallback when it is not set.
  • Tests

    • Updated coverage to verify environment-based CTest script resolution in containers.

The in-container -S argument imported holoscan_cli just to locate the
ctest script, so `test` failed in images without an importable CLI even
though HOLOSCAN_CLI_CTEST_SCRIPT is already forwarded into the container.
Use the forwarded env value first and keep the import only as the
fallback for projects that do not set it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0eef941c-43b7-4969-b1fd-abdb4780ea6f

📥 Commits

Reviewing files that changed from the base of the PR and between 2cfdd04 and 4e6bd2c.

📒 Files selected for processing (2)
  • src/holoscan_cli/commands/test_cmd.py
  • tests/unit/test_container_recursion.py

Walkthrough

The containerized ctest -S command now resolves its script from HOLOSCAN_CLI_CTEST_SCRIPT at runtime, falling back to HoloscanCLI.DEFAULT_CTEST_SCRIPT. Documentation and the corresponding unit assertion were updated.

Changes

Container ctest script resolution

Layer / File(s) Summary
Runtime script selection and validation
src/holoscan_cli/commands/test_cmd.py, tests/unit/test_container_recursion.py
The generated in-container command prefers HOLOSCAN_CLI_CTEST_SCRIPT, falls back to the default script path, and tests the updated command rendering.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: resolving the in-container ctest script from an environment variable before importing the CLI.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@wyli
wyli requested a review from tbirdso July 13, 2026 05:20
@wyli
wyli merged commit e1503db into main Jul 13, 2026
31 checks passed
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