Changeset 892

Show
Ignore:
Timestamp:
12/06/07 13:00:49 (9 months ago)
Author:
nicksieger
Message:

Turn off in-process launching when running tests in JRuby

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Rakefile

    r883 r892  
    6262end 
    6363 
    64 #### XXX Hack around JRuby test/unit interaction problems 
     64#### XXX Hack around JRuby in-process launching problem 
     65 
     66require 'rake/testtask' 
     67Rake::TestTask.new(:test_local) do |t| 
     68  t.libs << "lib" << "test" << "projects/gem_plugin/lib" 
     69  t.test_files = e.test_pattern 
     70end 
    6571 
    6672desc "Run each test suite in isolation on JRuby" 
    6773task :test_java do 
    68   e.test_pattern.each do |f| 
    69     sh "/opt/local/jruby/bin/jruby -w -Ilib:ext:bin:test -e 'require \"#{f}\"'" rescue nil 
     74  require 'jruby' 
     75  save = JRuby.runtime.instance_config.run_ruby_in_process 
     76  begin 
     77    JRuby.runtime.instance_config.run_ruby_in_process = false 
     78    Rake::Task[:test_local].invoke 
     79  ensure 
     80    JRuby.runtime.instance_config.run_ruby_in_process = save 
    7081  end 
    7182end