Module: ParallelTest::CLI

Defined in:
lib/parallel_tests/cli.rb

Class Method Summary collapse

Class Method Details

.run(argv) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/parallel_tests/cli.rb', line 6

def self.run(argv)
  options = parse_options!(argv)

  num_processes = ParallelTests.determine_number_of_processes(options[:count])
  num_processes = num_processes * (options[:multiply] || 1)

  if options[:execute]
    execute_shell_command_in_parallel(options[:execute], num_processes, options)
  else
    run_tests_in_parallel(num_processes, options)
  end
end