Skip to content

Commit

Permalink
create the jruby spawner with the URL of runtime.jruby_class_loader.p…
Browse files Browse the repository at this point in the history
…arent.urls

this allows run the tests from various setups: jruby-complete, jruby-core+jruby-stdlib
or the module jruby maven artifact with all its dependencies. actually the surefire launcher
combines all those jars into one temporary jar for launching the tests. in this manner
it is enough to pick only two jruby maven aritfact and jruby-jars and with this jruby-complete
is already covered.

Sponsored by Lookout Inc.
  • Loading branch information
mkristian committed Nov 20, 2014
1 parent 2976e13 commit e537cdc
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 158 deletions.
3 changes: 0 additions & 3 deletions maven/jruby-complete/src/it/extended/invoker.properties

This file was deleted.

9 changes: 0 additions & 9 deletions maven/jruby-complete/src/it/extended/pom.rb

This file was deleted.

40 changes: 0 additions & 40 deletions maven/jruby-complete/src/it/extended/pom.xml

This file was deleted.

This file was deleted.

9 changes: 6 additions & 3 deletions test/test_helper.rb
Expand Up @@ -10,9 +10,12 @@ module TestHelper
RUBY = if IS_JAR_EXECUTION
exe = 'java'
exe += RbConfig::CONFIG['EXEEXT'] if RbConfig::CONFIG['EXEEXT']
file = File.expand_path('maven/jruby-complete/target/jruby-complete-*.jar')
file = Dir[ file ].first
exe += " -cp .:#{file} org.jruby.Main"
# assume the parent CL of jruby-classloader has a getUrls method
urls = JRuby.runtime.getJRubyClassLoader.parent.get_ur_ls.collect do |u|
u.path
end
urls.unshift '.'
exe += " -cp #{urls.join(File::PATH_SEPARATOR)} org.jruby.Main"
exe
else
exe = '"' + File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['RUBY_INSTALL_NAME'])
Expand Down

0 comments on commit e537cdc

Please sign in to comment.