Skip to content

Commit

Permalink
Repeat flaky tests if they fail. (#2577)
Browse files Browse the repository at this point in the history
Co-authored-by: Kasper Lund <kasper@toit.io>
  • Loading branch information
floitsch and kasperl authored Oct 9, 2024
1 parent 2a13c0d commit 4890e79
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ add_custom_target(

add_custom_target(
check_flaky
COMMAND ${CMAKE_CTEST_COMMAND} -j${NUM_CPU} --label-regex "flaky" -T test -C slow --output-on-failure -I ${TEST_SHARD_START},,${TEST_SHARD_STRIDE}
# Run flaky tests up to 3 times.
COMMAND ${CMAKE_CTEST_COMMAND} -j${NUM_CPU} --repeat until-pass:3 --label-regex "flaky" -T test -C slow --output-on-failure -I ${TEST_SHARD_START},,${TEST_SHARD_STRIDE}
USES_TERMINAL
DEPENDS build_tools
)
Expand Down

0 comments on commit 4890e79

Please sign in to comment.