mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Run all railties tests before reporting failure
This commit is contained in:
parent
b342db680b
commit
6a099b1682
1 changed files with 14 additions and 1 deletions
|
@ -28,6 +28,8 @@ namespace :test do
|
|||
require "bundler/setup" unless defined?(Bundler)
|
||||
require "active_support"
|
||||
|
||||
failing_files = []
|
||||
|
||||
dirs = (ENV["TEST_DIR"] || ENV["TEST_DIRS"] || "**").split(",")
|
||||
test_files = dirs.map { |dir| "test/#{dir}/*_test.rb" }
|
||||
Dir[*test_files].each do |file|
|
||||
|
@ -46,9 +48,20 @@ namespace :test do
|
|||
Process.waitpid fork { ARGV.clear; load file }
|
||||
|
||||
unless $?.success?
|
||||
raise "Command failed with status (#{$?.exitstatus}): #{fake_command}"
|
||||
failing_files << file
|
||||
end
|
||||
end
|
||||
|
||||
unless failing_files.empty?
|
||||
puts
|
||||
puts "Failed in:"
|
||||
failing_files.each do |file|
|
||||
puts " #{file}"
|
||||
end
|
||||
puts
|
||||
|
||||
raise "Failure in isolated test runner"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue