Skip to content

Commit

Permalink
+ Deprecated $N for specifying number of parallel test runners. Use M…
Browse files Browse the repository at this point in the history
…T_CPU.

[git-p4: depot-paths = "//src/minitest/dev/": change = 12112]
  • Loading branch information
zenspider committed Jun 9, 2019
1 parent 1f2b132 commit 4103a10
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/minitest.rb
Expand Up @@ -21,7 +21,10 @@ module Minitest
# Parallel test executor

mc.send :attr_accessor, :parallel_executor
self.parallel_executor = Parallel::Executor.new((ENV["N"] || 2).to_i)

warn "DEPRECATED: use MT_CPU instead of N for parallel test runs" if ENV["N"]
n_threads = (ENV["MT_CPU"] || ENV["N"] || 2).to_i
self.parallel_executor = Parallel::Executor.new n_threads

##
# Filter object for backtraces.
Expand Down

0 comments on commit 4103a10

Please sign in to comment.