Skip to content
Permalink
Browse files
[Truffle] jt run command (work around for broken JRuby launcher).
  • Loading branch information
chrisseaton committed Jan 23, 2015
1 parent 5d71187 commit 0fb5e4bd46ec0114e6f5e40f942721c378058f00
Showing with 8 additions and 3 deletions.
  1. +8 −3 tool/jt.rb
@@ -14,7 +14,7 @@ module ShellUtils
private

def sh(*args)
system(*args)
system(args.join(' '))
raise "failed" unless $? == 0
end

@@ -34,6 +34,7 @@ def help
puts 'jt build build'
puts 'jt clean clean'
puts 'jt rebuild clean and build'
puts 'jt run args... run JRuby with -X+T and args'
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'
@@ -61,6 +62,10 @@ def rebuild
build
end

def run(*args)
sh *(%w[VERIFY_JRUBY=1 bin/jruby -J-cp truffle/target/jruby-truffle-9.0.0.0-SNAPSHOT.jar -X+T] + args)
end

def test(*args)
options = %w[--excl-tag fails]
if args.first == 'fast'
@@ -98,7 +103,7 @@ def findbugs(report=nil)
class JT
include Commands

def run(args)
def main(args)
args = args.dup

if args.empty? or %w[-h -help --help].include? args.first
@@ -123,4 +128,4 @@ def run(args)
end
end

JT.new.run(ARGV)
JT.new.main(ARGV)

0 comments on commit 0fb5e4b

Please sign in to comment.