Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 02817a89e8c7
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6250a0564ada
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Jan 26, 2015

  1. Copy the full SHA
    694f4a6 View commit details
  2. Copy the full SHA
    6250a05 View commit details
Showing with 20 additions and 18 deletions.
  1. +20 −18 tool/jt.rb
38 changes: 20 additions & 18 deletions tool/jt.rb
Original file line number Diff line number Diff line change
@@ -16,16 +16,16 @@ module Utilities
ENV['GRAAL_BIN'],
'../graalvm-jdk1.8.0/bin/java', # This also seems like a sensible place to keep it
'../../graal/graalvm-jdk1.8.0/bin/java' # This is where I (CS) keep it
]
].compact

def self.find_graal
GRAAL_LOCATIONS.each do |location|
if !location.nil? && File.executable?(location)
return location
end
not_found = -> {
# TODO(CS 24-Jan-15) download it?
raise "coudln't find graal"
}
GRAAL_LOCATIONS.find(not_found) do |location|
File.executable?(location)
end
# TODO(CS 24-Jan-15) download it?
raise "coudln't find graal"
end

end
@@ -56,7 +56,7 @@ def help
puts 'jt rebuild clean and build'
puts 'jt run [options] args... run JRuby with -X+T and args'
puts ' --graal use Graal (set GRAAL_BIN or it will try to automagically find it)'
puts ' --asm show assembly (use with --graal)'
puts ' --asm show assembly (implies --graal)'
puts 'jt test run all specs'
puts 'jt test fast run all specs except sub-processes, GC, sleep, ...'
puts 'jt test spec/ruby/language run specs in this directory'
@@ -88,20 +88,22 @@ def run(*args)
env_vars = {}
jruby_args = []

while %w[--graal --asm].include? args.first
case args.shift
when '--graal'
env_vars["JAVACMD"] = Utilities.find_graal
jruby_args << '-J-server'
when '--asm'
jruby_args += %w[-J-XX:+UnlockDiagnosticVMOptions -J-XX:CompileCommand=print,*::callRoot]
end
{ '--asm' => '--graal' }.each_pair do |arg, dep|
args.unshift dep if args.include?(arg)
end

if args.delete('--graal')
env_vars["JAVACMD"] = Utilities.find_graal
jruby_args << '-J-server'
end

if args.delete('--asm')
jruby_args += %w[-J-XX:+UnlockDiagnosticVMOptions -J-XX:CompileCommand=print,*::callRoot]
end

env_vars['VERIFY_JRUBY'] = '1'
jruby_args += args

sh(env_vars, *%w[bin/jruby -J-cp truffle/target/jruby-truffle-9.0.0.0-SNAPSHOT.jar -X+T], *jruby_args)
sh(env_vars, *%w[bin/jruby -J-cp truffle/target/jruby-truffle-9.0.0.0-SNAPSHOT.jar -X+T], *jruby_args, *args)
end

def test(*args)