Skip to content

ci: self-describing Bash 3.2 test counts - #7775

Merged
kunchenguid merged 6 commits into
mainfrom
fm/ci-counts-01-self-describing
Oct 26, 2026
Merged

kunchenguid merged 6 commits into
mainfrom
fm/ci-counts-01-self-describing

Conversation

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate:

Replace hard-coded ok-counts in the macOS stock-Bash CI job with TAP self-describing suites. fm_test_run prints a 1..N plan from the registered names and FM_TEST_COMPLETE after they all run. New helper bin/fm-test-tap-verify.sh checks that plan, the ok count, no not ok lines, the marker, and exit 0. CI subsets use FM_TEST_STOCK_BASH=1 instead of counts in .github/workflows/ci.yml. The backend adapter precheck split into two functions.

Counts preserved: 60/18/6/1/1/2. Helper and suites stay Bash 3.2 compatible. Focused FM_TEST_ONLY runs stay the main shape: a single quoted name, no plan or marker.

Tests run on this head: tests/fm-test-tap-verify.test.sh (8 ok); helper-wrapped stock-bash suites fm-bearings-snapshot 60, fm-fleet-snapshot-view 18, fm-fork-free-helpers 6, fm-public-followup (STOCK_BASH) 1, fm-watch-triage (STOCK_BASH) 1, fm-backend (STOCK_BASH) 2; bash -n on the helper and tests/lib.sh; bin/fm-lint.sh clean.

This edits .github/workflows/ci.yml, so the maintainer merges it. Open PRs that bump ci.yml ok-counts (#7048, #7392, #6123, #6451, #6712, #7711, #6469, #6717, #6205, #7493, #3418, #4019) should drop that hunk when they next resolve conflicts.

Open in Web Open in Cursor 

cursoragent and others added 5 commits October 26, 2026 06:12
The macOS Bash 3.2 job hard-coded ok-counts in ci.yml, so adding a test
to those six suites required a workflow edit. Suites now print 1..N from
fm_test_run and FM_TEST_COMPLETE; a shared helper checks plan, ok count,
not-ok lines, completion, and exit status.

Co-authored-by: Kun Chen <[email protected]>
Stock-bash backend subset selection is only FM_TEST_STOCK_BASH=1.
fm_test_run runs exactly the function names it is given.
fm-test-tap-verify.sh no longer accepts --bash INTERPRETER.

Co-authored-by: Kun Chen <[email protected]>
…sidue

Keep the single-name focused-run path as on main (no plan or marker).
CI still selects stock-bash subsets via FM_TEST_STOCK_BASH and the helper.
The helper runs the suite under "$BASH" with only -h/--help and one argument.

Co-authored-by: Kun Chen <[email protected]>
The helper takes one script path after -h/--help.
fm_test_run still refuses a name that is not a function.
grep -c already supplies count_matches' zero.

Co-authored-by: Kun Chen <[email protected]>
A completeness failure now always prints ::error:: plus the stderr line.
The self-test captures that output so a passing run does not leak it.
The summary label is the script basename.

Co-authored-by: Kun Chen <[email protected]>
Bring in the ubuntu-24.04 Linux CI pins from #7798 while keeping this branch's self-describing TAP test counts.

Co-authored-by: Kun Chen <[email protected]>
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