lib/parallel_tests/cli.rb in parallel_tests-1.7.1 vs lib/parallel_tests/cli.rb in parallel_tests-1.8.0

- old
+ new

@@ -224,16 +224,20 @@ klass_name = "ParallelTests::#{runner_classname}::Runner" klass_name.split('::').inject(Object) { |x, y| x.const_get(y) } end def execute_shell_command_in_parallel(command, num_processes, options) - runs = (0...num_processes).to_a + runs = if options[:only_group] + options[:only_group].map{|g| g - 1} + else + (0...num_processes).to_a + end results = if options[:non_parallel] runs.map do |i| ParallelTests::Test::Runner.execute_command(command, i, num_processes, options) end else - execute_in_parallel(runs, num_processes, options) do |i| + execute_in_parallel(runs, runs.size, options) do |i| ParallelTests::Test::Runner.execute_command(command, i, num_processes, options) end end.flatten abort if results.any? { |r| r[:exit_status] != 0 }