diff options
author | Matthew Draper <matthew@trebex.net> | 2017-09-02 23:15:43 +0930 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2017-09-03 05:15:14 +0930 |
commit | 6a099b168216db45be2d95aa51eac62100b62058 (patch) | |
tree | 06d7006c979d1e5b7f667413530cc6b3ecd83ae0 | |
parent | b342db680bd18105aa903fb4da13c634fd0816f5 (diff) | |
download | rails-6a099b168216db45be2d95aa51eac62100b62058.tar.gz rails-6a099b168216db45be2d95aa51eac62100b62058.tar.bz2 rails-6a099b168216db45be2d95aa51eac62100b62058.zip |
Run all railties tests before reporting failure
-rw-r--r-- | railties/Rakefile | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/railties/Rakefile b/railties/Rakefile index 500fc88fbb..be7d9f96a2 100644 --- a/railties/Rakefile +++ b/railties/Rakefile @@ -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 |