1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test/unit.rb: job testing flag

* test/lib/test/unit.rb (Parallel#non_options): split testing flag
  and job count by OptionParser.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-02-03 12:52:08 +00:00
parent 367acdaa30
commit 953093e2a4

View file

@ -148,13 +148,9 @@ module Test
options[:retry] = true
opts.on '-j N', '--jobs N', "Allow run tests with N jobs at once" do |a|
if /^t/ =~ a
options[:testing] = true # For testing
options[:parallel] = a[1..-1].to_i
else
options[:parallel] = a.to_i
end
opts.on '-j N', '--jobs N', /\A(t)?(\d+)\z/, "Allow run tests with N jobs at once" do |_, t, a|
options[:testing] = true & t # For testing
options[:parallel] = a.to_i
end
opts.on '--separate', "Restart job process after one testcase has done" do