Skip to content

CI: Add a flake-repeat option to the Tier 2 harness - #69

Merged
zackees merged 2 commits into
obs-rust:masterfrom
b7216309-jpg:ci/tier2-repeat
Oct 10, 2026
Merged

zackees merged 2 commits into
obs-rust:masterfrom
b7216309-jpg:ci/tier2-repeat

Conversation

@b7216309-jpg

Copy link
Copy Markdown
Contributor

Refs #44

#44 notes that the threading and task ports need "100 runs without a flake" (testing-policy.md), and that the Tier 2 harness had no repeat option. #38 likewise left ctest --repeat until-fail:100 -R 'test_threading|test_task' unrun. This adds the option to all three harness scripts:

rust/tools/linux-validate/run.sh --repeat 100 --tests 'test_threading|test_task'
rust/tools/tier2-validate/validate.sh --repeat 100 --tests 'test_threading|test_task'      # macOS
rust/tools/tier2-validate/validate.ps1 -CMockaPrefix ... -Repeat 100 -Tests 'test_threading|test_task'

Behavior

  • The normal full ctest run is unchanged. With --repeat N, each build (OFF and ON) then runs ctest --repeat until-fail:N, restricted to -R REGEX when --tests is given. It stops at the first failure, and the script fails.
  • Without the new options nothing changes: same commands, same output. The CI jobs are untouched.
  • run.sh forwards its arguments into the container (/validate.sh "$@").
  • Bad arguments are rejected before any build work:
    • bash: a missing or non-integer count, --tests without --repeat, or an unknown option all exit with code 2 and a message;
    • PowerShell: -Repeat is [ValidateRange(0, ...)], and -Tests without -Repeat throws.

Verification

I have no Docker, macOS or cmocka here, so the repeat run itself has not been executed end to end. What I checked:

  • bash -n passes on all three bash scripts, and the PowerShell parser reports 0 errors on validate.ps1.
  • Rejections: --repeat, --repeat x, --repeat -3, --tests foo and --bogus each exit 2 in both bash scripts, before any side effect. -Tests x (without -Repeat), -Repeat -1 and -Repeat abc are each rejected in PowerShell.
  • Accepted values: I ran the parse block in isolation for '', --repeat 100, --repeat 100 --tests 'test_threading|test_task', the reversed order, and --repeat 0, and got the expected repeat/-R values.
  • run.sh with a fake docker on PATH forwards [/validate.sh] [--repeat] [100] [--tests] [test_threading|test_task], with the regex as one argument. With no arguments it forwards just [/validate.sh].
  • The arguments validate.ps1 builds for ctest are --repeat until-fail:100 -R test_threading|test_task.
  • The committed scripts have LF line endings and unchanged file modes.

ctest --repeat needs CMake ≥ 3.17; the Docker image's CMake is newer than that. A first real run, e.g. run.sh --repeat 100 --tests 'test_threading|test_task', would confirm it on Linux. I'm happy to wire it into the rust-linux-tier2 job too if you want CI to enforce it, but I didn't touch workflows here.

🤖 Generated with Claude Code

b7216309-jpg and others added 2 commits October 9, 2026 23:00
testing-policy.md requires 100 consecutive runs without a flake for the
threading and task tests, and obs-rust#44 notes the Tier 2 harness had no way to
run that. Add one to all three harness scripts:

  rust/tools/linux-validate/run.sh --repeat 100 \
    --tests 'test_threading|test_task'

After the normal ctest run (unchanged), each build (OFF and ON) reruns
the tests, or those matching --tests, with
ctest --repeat until-fail:N, stopping at the first failure. run.sh
forwards its arguments into the container; tier2-validate/validate.sh
takes the same options on macOS, and validate.ps1 takes -Repeat and
-Tests on Windows. Bad arguments are rejected (exit 2, or a parameter
error) before any build work. Without the new options nothing changes.

Refs obs-rust#44

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The previous Rust Tier 2 Linux run failed before any test ran: pulling
ubuntu:26.04 returned 429 Too Many Requests. No code change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@zackees
zackees merged commit fcdcd95 into obs-rust:master Oct 10, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants