Skip to content

Commit

Permalink
[Truffle] Simpler way to handle --graal and other run options in test…
Browse files Browse the repository at this point in the history
…_mri.
  • Loading branch information
eregon committed Nov 1, 2016
1 parent 579a710 commit 0120083
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions tool/jt.rb
Expand Up @@ -780,21 +780,8 @@ def test_mri(*args)
}
jruby_args = %w[-J-Xmx2G -Xtruffle.exceptions.print_java]

if args.delete('--graal')
if ENV["RUBY_BIN"]
# Assume that Graal is automatically set up if RUBY_BIN is set.
# This will also warn if it's not.
else
javacmd, javacmd_options = Utilities.find_graal_javacmd_and_options
env_vars["JAVACMD"] = javacmd
jruby_args.push(*javacmd_options)
end
else
jruby_args << '-Xtruffle.graal.warn_unless=false'
end

if args.empty?
args = File.readlines("#{JRUBY_DIR}/test/mri_truffle.index").grep(/^[^#]\w+/).map(&:chomp)
if args.count { |arg| !arg.start_with?('-') } == 0
args += File.readlines("#{JRUBY_DIR}/test/mri_truffle.index").grep(/^[^#]\w+/).map(&:chomp)
end

command = %w[test/mri/runner.rb -v --color=never --tty=no -q]
Expand Down

0 comments on commit 0120083

Please sign in to comment.