370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
|
# File 'lib/rspec/queue.rb', line 370
def run_specs(example_groups)
examples = example_groups.flat_map(&:descendants).flat_map do |example_group|
example_group.filtered_examples.map do |example|
SingleExample.new(example_group, example)
end
end
queue = CI::Queue.from_uri(queue_url, RSpec::Queue.config)
queue = queue.retry_queue if retrying
BuildStatusRecorder.build = queue.build
queue.populate(examples, random: ordering_seed, &:id)
examples_count = examples.size
success = true
@configuration.reporter.report(examples_count) do |reporter|
@configuration.add_formatter(BuildStatusRecorder)
@configuration.with_suite_hooks do
break if @world.wants_to_quit
queue.poll do |example|
success &= example.run(QueueReporter.new(reporter, queue, example))
break if @world.wants_to_quit
end
end
end
return 0 if @world.non_example_failure
success ? 0 : @configuration.failure_exit_code
end
|