Class: TestQueue::Runner::Minitest
Constant Summary
MiniTest, TOKEN_REGEX
Instance Attribute Summary
#concurrency, #exit_when_done, #stats
Instance Method Summary
collapse
#abort, #after_fork, #after_fork_internal, #around_filter, #awaiting_suites?, #cleanup_worker, #collect_worker_data, #connect_to_relay, #discover_suites, #distribute_queue, #enqueue_discovered_suite, #execute, #execute_internal, #kill_subprocesses, #kill_suite_discovery_process, #kill_workers, #prepare, #queue_status, #reap_suite_discovery_process, #reap_workers, #relay?, #relay_to_master, #spawn_workers, #start_relay, #stats_file, #stop_master, #summarize, #summarize_internal, #worker_completed
Constructor Details
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/test_queue/runner/minitest5.rb', line 64
def initialize
@options = ::Minitest.process_args ARGV
if ::Minitest.respond_to?(:seed)
::Minitest.seed = @options[:seed]
srand ::Minitest.seed
end
if ::Minitest::Test.runnables.any? { |r| r.runnable_methods.any? }
raise 'Do not `require` test files. Pass them via ARGV instead and they will be required as needed.'
end
super(TestFramework::Minitest.new)
end
|
Instance Method Details
#run_worker(iterator) ⇒ Object
85
86
87
88
|
# File 'lib/test_queue/runner/minitest5.rb', line 85
def run_worker(iterator)
::Minitest::Test.runnables = iterator
::Minitest.run ? 0 : 1
end
|
#start_master ⇒ Object
79
80
81
82
83
|
# File 'lib/test_queue/runner/minitest5.rb', line 79
def start_master
puts "Run options: #{@options[:args]}\n\n"
super
end
|
#summarize_worker(worker) ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/test_queue/runner/minitest.rb', line 12
def summarize_worker(worker)
worker.summary = worker.lines.grep(/, \d+ errors?, /).first
failures = worker.lines.select { |line|
line if (line =~ /^Finished/) ... (line =~ /, \d+ errors?, /)
}[1..-2]
worker.failure_output = failures.join("\n") if failures
end
|