aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/Rakefile20
1 files changed, 12 insertions, 8 deletions
diff --git a/railties/Rakefile b/railties/Rakefile
index 0f305ea332..51f46d1817 100644
--- a/railties/Rakefile
+++ b/railties/Rakefile
@@ -95,14 +95,18 @@ namespace :test do
])
puts fake_command
- # We could run these in parallel, but pretty much all of the
- # railties tests already run in parallel, so ¯\_(⊙︿⊙)_/¯
- Process.waitpid fork {
- ARGV.clear.concat test_options
- Rake.application = nil
-
- load file
- }
+ if Process.respond_to?(:fork)
+ # We could run these in parallel, but pretty much all of the
+ # railties tests already run in parallel, so ¯\_(⊙︿⊙)_/¯
+ Process.waitpid fork {
+ ARGV.clear.concat test_options
+ Rake.application = nil
+
+ load file
+ }
+ else
+ Process.wait spawn(fake_command)
+ end
unless $?.success?
failing_files << file