mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 10:33:51 +08:00
DEV: Skip parallel autospec spec for a single file (#11206)
turbo_rspec can't parallelize a single spec file, so it's not worth the extra setup time for the parallel runner
This commit is contained in:
parent
ae8c96ed35
commit
24976669b8
|
@ -22,9 +22,9 @@ module Autospec
|
|||
]
|
||||
|
||||
command = begin
|
||||
if ENV["PARALLEL_SPEC"] == '1' &&
|
||||
!specs.split.any? { |s| puts s; s =~ /\:/ } # Parallel spec can't run specific groups
|
||||
|
||||
line_specified = specs.split.any? { |s| s =~ /\:/ } # Parallel spec can't run specific line
|
||||
multiple_files = specs.split.count > 1 # Only paralellize multiple files
|
||||
if ENV["PARALLEL_SPEC"] == '1' && multiple_files && !line_specified
|
||||
"bin/turbo_rspec #{args.join(" ")} #{specs.split.join(" ")}"
|
||||
else
|
||||
"bin/rspec #{args.join(" ")} #{specs.split.join(" ")}"
|
||||
|
|
Loading…
Reference in New Issue
Block a user