mirror of
https://github.com/discourse/discourse.git
synced 2025-04-28 23:34:35 +08:00
DEV: Allow autospec to run full test suite in parallel (#11976)
The definition of 'multiple_files' did not consider that 'spec' refers to the entire `spec/` directory, and therefore includes multiple files
This commit is contained in:
parent
dbb5c373ce
commit
414224ce07
@ -23,7 +23,7 @@ module Autospec
|
|||||||
|
|
||||||
command = begin
|
command = begin
|
||||||
line_specified = specs.split.any? { |s| s =~ /\:/ } # Parallel spec can't run specific line
|
line_specified = specs.split.any? { |s| s =~ /\:/ } # Parallel spec can't run specific line
|
||||||
multiple_files = specs.split.count > 1 # Only paralellize multiple files
|
multiple_files = specs.split.count > 1 || specs == "spec" # Only paralellize multiple files
|
||||||
if ENV["PARALLEL_SPEC"] == '1' && multiple_files && !line_specified
|
if ENV["PARALLEL_SPEC"] == '1' && multiple_files && !line_specified
|
||||||
"bin/turbo_rspec #{args.join(" ")} #{specs.split.join(" ")}"
|
"bin/turbo_rspec #{args.join(" ")} #{specs.split.join(" ")}"
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user