about summary refs log tree commit homepage
path: root/Rakefile
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-06-03 23:01:20 +0000
committerEric Wong <normalperson@yhbt.net>2010-06-03 23:01:20 +0000
commite687ede9cd390b09bf1e87c6de18924ec57ff3c3 (patch)
treec08e580f888dc3d8db9e1051602f64254ac705f6 /Rakefile
parent8e55e561a1bcba57bf429c9c2111ec5351fcb1b3 (diff)
downloadunicorn-e687ede9cd390b09bf1e87c6de18924ec57ff3c3.tar.gz
We'll be switching to Isolate and shell-based tests
since the old test/unit-based Rails test was basically
a shell script written in Ruby.
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 598852e..469ed3d 100644
--- a/Rakefile
+++ b/Rakefile
@@ -189,3 +189,24 @@ begin
   end
 rescue LoadError
 end
+
+task :isolate do
+  require 'isolate'
+  opts = {
+    :system => false,
+    :path => "tmp/isolate/ruby-#{RUBY_VERSION}",
+    :multiruby => false, # we want "1.8.7" instead of "1.8"
+  }
+
+  # C extensions aren't binary-compatible across Ruby versions
+  fork { Isolate.now!(opts) { gem 'sqlite3-ruby', '1.2.5' } }
+
+  # pure Ruby gems can be shared across all Rubies
+  %w(3.0.0.beta3).each do |rails_ver|
+    opts[:path] = "tmp/isolate/rails-#{rails_ver}"
+    fork { Isolate.now!(opts) { gem 'rails', rails_ver } }
+  end
+
+  failed = Process.waitall.delete_if { |(_,status)| status.success? }
+  abort failed.inspect unless failed.empty?
+end