Repository navigation
CI: Add a flake-repeat option to the Tier 2 harness - #69
Merged
Merged
Conversation
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]>
7 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:Behavior
ctestrun is unchanged. With--repeat N, each build (OFF and ON) then runsctest --repeat until-fail:N, restricted to-R REGEXwhen--testsis given. It stops at the first failure, and the script fails.run.shforwards its arguments into the container (/validate.sh "$@").--testswithout--repeat, or an unknown option all exit with code 2 and a message;-Repeatis[ValidateRange(0, ...)], and-Testswithout-Repeatthrows.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 -npasses on all three bash scripts, and the PowerShell parser reports 0 errors onvalidate.ps1.--repeat,--repeat x,--repeat -3,--tests fooand--boguseach exit 2 in both bash scripts, before any side effect.-Tests x(without-Repeat),-Repeat -1and-Repeat abcare each rejected in PowerShell.'',--repeat 100,--repeat 100 --tests 'test_threading|test_task', the reversed order, and--repeat 0, and got the expectedrepeat/-Rvalues.run.shwith a fakedockeron 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].validate.ps1builds for ctest are--repeat until-fail:100 -R test_threading|test_task.ctest --repeatneeds 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 therust-linux-tier2job too if you want CI to enforce it, but I didn't touch workflows here.🤖 Generated with Claude Code