Skip to content

Fix --tree-suite-result selecting summary output#82

Open
94xhn wants to merge 1 commit into
cegonse:masterfrom
94xhn:fix-tree-suite-long-option
Open

Fix --tree-suite-result selecting summary output#82
94xhn wants to merge 1 commit into
cegonse:masterfrom
94xhn:fix-tree-suite-long-option

Conversation

@94xhn

@94xhn 94xhn commented Jul 14, 2026

Copy link
Copy Markdown

Problem

The documented --tree-suite-result option sets only_test_suite_result, while its short alias -t correctly sets tree_test_suite_result.

Because the output dispatcher checks the summary flag first, the long form prints only the one-line suite summary instead of the nested tree promised by the help text.

Fix

Map --tree-suite-result to tree_test_suite_result, matching -t, and add a command-line parser regression that checks both aliases select tree mode without selecting summary-only mode.

Verification

  • A strict GCC 13 C++20 harness against the unmodified parser reproduced --tree-suite-result as only=1 tree=0, while -t produced only=0 tree=1.
  • With the fix, both forms produce only=0 tree=1.
  • The official command-line-arguments test executable, including the new regression, passes.
  • All 92 CMake/Ninja build steps completed, and the full cest-runner returned 0.
  • Running the real nested-suite executable with --tree-suite-result and -t produces identical tree output.
  • git diff --check passes.

Quom is not installed in this local environment, so the CMake run used the repository multi-header source through a forwarding build/cest header. CI installs Quom and will additionally verify the generated single-header path.

The long tree-output option set only_test_suite_result while its -t alias
set tree_test_suite_result. As a result, the documented long form printed
the one-line suite summary instead of the nested result tree.

Map both aliases to the same field and add a parser regression covering
the selected and unselected output modes.

Constraint: Long and short aliases must produce identical CommandLineOptions state.
Rejected: Change the output dispatcher | the dispatcher already distinguishes the two valid modes correctly.
Confidence: high
Scope-risk: narrow
Directive: Keep each command-line alias pair mapped to the same option field.
Tested: baseline/fixed GCC 13 C++20 harness; command-line-arguments suite; 92-step CMake/Ninja build; full cest-runner exit 0; long/short nested-tree output match; git diff --check
Not-tested: Quom single-header regeneration in this environment because Quom is not installed; CI installs it
@94xhn
94xhn force-pushed the fix-tree-suite-long-option branch from 9eaf6ee to 386cb8d Compare July 14, 2026 21:44
@sonarqubecloud

Copy link
Copy Markdown

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