Skip to content

fix(ci): restore the macOS else branch that #195 destroyed - #197

Merged
transfix merged 1 commit into
masterfrom
fix/restore-macos-else-branch
Aug 18, 2026
Merged

transfix merged 1 commit into
masterfrom
fix/restore-macos-else-branch

Conversation

@transfix

Copy link
Copy Markdown
Owner

Regression from my own #195. It patched two ctest sites with a line-based
script that assumed both had the same five-line body. The macOS site is written
more compactly, so the patch consumed the else line and the first line of its
ctest call, leaving the remainder dangling:

                  -R "${STRESS_REGEX}"
                  --output-on-failure --parallel --repeat until-pass:3 --timeout 300 \
                  -E "${STRESS_REGEX}"
          fi

Two consequences — the quiet one is worse

On push, the shell reached the orphaned line and tried to execute it:

/Users/runner/work/_temp/5b22a0c1-....sh: line 33: --output-on-failure: command not found
##[error]Process completed with exit code 127

That is how package-macos / libcvc-release failed.

On pull_request, the else branch no longer existed. The condition was
false, so nothing ran — macOS PR jobs would have reported success having
executed zero tests.

Fix

The else branch is restored, so both sites are identical in behaviour again.

Verification

Each block evaluated with the GitHub expressions substituted and ctest
stubbed, counting actual invocations per path — for both blocks:

path ctest invocations
push / Release 2 (light --parallel, then heavy --parallel 1)
push / Debug 1 (light only; heavy excluded)
pull_request / * 1 (light only)

No path runs zero. That is the check that would have caught this, and the
one #195 did not make: bash -n passed on the broken file, because dangling
arguments are perfectly valid syntax. Syntax-checking proved the file parsed;
it could not prove the file did anything.

#195 patched two ctest sites with a line-based script that assumed both had
the same five-line body. The macOS site is written more compactly, so the
patch consumed the `else` line and the first line of its ctest call, and left
the remainder dangling:

                  -R "${STRESS_REGEX}"
                  --output-on-failure --parallel --repeat until-pass:3 ... \
                  -E "${STRESS_REGEX}"
          fi

Two consequences, and the quiet one is worse:

  * On push, the shell reached the orphaned line and tried to run it:
        .../5b22a0c1.sh: line 33: --output-on-failure: command not found
        ##[error]Process completed with exit code 127
    which is how package-macos / libcvc-release failed.

  * On pull_request the `else` branch no longer existed, so the condition was
    false and NOTHING ran. macOS PR jobs would have reported success having
    executed zero tests.

The else branch is restored, so both sites are now identical in behaviour.

Verified by evaluating each block with the GitHub expressions substituted and
ctest stubbed, counting invocations per path:

    push/Release      2   (light --parallel, then heavy --parallel 1)
    push/Debug        1   (light only; heavy excluded)
    pull_request/*    1   (light only)

for BOTH blocks. No path runs zero -- which is the check that would have
caught this, and the one #195 did not make. `bash -n` alone passed on the
broken file, because dangling arguments are valid syntax.
@transfix
transfix merged commit 6f25e05 into master Aug 18, 2026
12 checks passed
@transfix
transfix deleted the fix/restore-macos-else-branch branch August 18, 2026 21:32
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