Class: ParallelTests::FineGrainTest::Runner

Inherits:
Test::Runner
  • Object
show all
Defined in:
lib/parallel_tests/fine_grain_test/runner.rb

Class Method Summary collapse

Class Method Details

.run_tests(_, process_number, num_processes, options) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/parallel_tests/fine_grain_test/runner.rb', line 8

def run_tests(_, process_number, num_processes, options)
  require_list = @@tests.map { |file| file.sub(" ", "\\ ") }.join(" ")
  test_helper = File.expand_path("../test_helper", __FILE__)
  cmd = "#{executable} -Itest -e '%w[#{require_list}].each { |f| " \
        "require %{./\#{f}}; require %{#{test_helper}}; " \
        "}' -- #{options[:test_options]}"
  execute_command(cmd, process_number, num_processes, options)
end

.tests_in_groups(tests, num_groups, options = {}) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/parallel_tests/fine_grain_test/runner.rb', line 17

def tests_in_groups(tests, num_groups, options={})
  ParallelTests::FineGrainTest::FileQueue.new.reset

  results = super
  @@tests = results.flatten
  results
end