11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/dohtest/master_runner.rb', line 11
def run
start_time = Time.now
@config[:pre_test_callback].call(@output) if @config[:pre_test_callback]
if @paths.empty?
unless DohTest.require_paths(@config[:glob], ['.'])
DohTest.require_paths(@config[:glob], [@config[:root]])
end
else
DohTest.require_paths(@config[:glob], @paths)
end
srand(@config[:seed])
@output.run_begin(@config)
total_problems = 0
TestGroup.descendants.each do |group_class|
runner = GroupRunner.new(group_class, @output, @config)
brink_hit = runner.run
total_problems += runner.total_problems
break if brink_hit
end
if @config[:post_all_callback]
if (!@config[:post_all_callback].call(total_problems))
@output.callback_failed(@config[:post_all_callback].inspect)
end
end
@output.run_end(Time.now - start_time)
end
|