1
0
Fork 0
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:
Matthew Draper 2017-09-02 23:15:43 +09:30
parent b342db680b
commit 6a099b1682

View file

@ -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