diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-06-03 23:01:20 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-06-03 23:01:20 +0000 |
commit | e687ede9cd390b09bf1e87c6de18924ec57ff3c3 (patch) | |
tree | c08e580f888dc3d8db9e1051602f64254ac705f6 /Rakefile | |
parent | 8e55e561a1bcba57bf429c9c2111ec5351fcb1b3 (diff) | |
download | unicorn-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-- | Rakefile | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -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 |