Skip to content

Commit

Permalink
[Truffle] jt run command (work around for broken JRuby launcher).
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisseaton committed Jan 23, 2015
1 parent 5d71187 commit 0fb5e4b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tool/jt.rb
Expand Up @@ -14,7 +14,7 @@ module ShellUtils
private

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

Expand All @@ -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'
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand All @@ -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.