Skip to content

Commit 1be6a47

Browse files
authored
Print rerun command for failed parallel_rspec shards (#5339)
Add --verbose-rerun-command to the parallel_rspec invocations so a failing shard prints a copy-pasteable command with its exact file list and seed. This makes order-dependent flakes reproducible locally, since RSpec order depends on both the seed and the shard's file set and the latter was not previously recoverable from CI output. The flag only emits output on failure, so green runs are unaffected.
1 parent 06a687b commit 1be6a47

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/tasks/spec.rake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ namespace :spec do
4747
#{env_vars} bundle exec parallel_rspec \
4848
--test-options '--order rand #{rspec_profile_option} --format progress --format ParallelTests::RSpec::RuntimeLogger --out tmp/parallel_runtime_rspec_main.log' \
4949
--runtime-log tmp/parallel_runtime_rspec_main.log \
50+
--verbose-rerun-command \
5051
--single spec/integration/ \
5152
--single spec/acceptance/ \
5253
--isolate \
@@ -61,6 +62,7 @@ namespace :spec do
6162
#{env_vars} bundle exec parallel_rspec \
6263
--test-options '--order rand #{rspec_profile_option} --format progress --format ParallelTests::RSpec::RuntimeLogger --out tmp/parallel_runtime_rspec_migrations.log' \
6364
--runtime-log tmp/parallel_runtime_rspec_migrations.log \
65+
--verbose-rerun-command \
6466
-- spec/migrations
6567
CMD
6668
sh command

0 commit comments

Comments
 (0)