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: 682d34b858b0
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7f827e01e7d8
Choose a head ref
  • 3 commits
  • 1 file changed
  • 1 contributor

Commits on Nov 23, 2015

  1. Copy the full SHA
    9150807 View commit details
  2. Copy the full SHA
    9a0b537 View commit details
  3. Copy the full SHA
    7f827e0 View commit details
Showing with 28 additions and 29 deletions.
  1. +28 −29 tool/jt.rb
57 changes: 28 additions & 29 deletions tool/jt.rb
Original file line number Diff line number Diff line change
@@ -181,12 +181,11 @@ module Commands
include ShellUtils

def help
puts 'jt build [options] build'
puts 'jt build truffle [options] build only the Truffle part, assumes the rest is up-to-date'
puts 'jt rebuild [options] clean and build'
puts ' --no-tests don\'t run JUnit unit tests'
puts 'jt build build'
puts 'jt build truffle build only the Truffle part, assumes the rest is up-to-date'
puts 'jt clean clean'
puts 'jt irb irb'
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 (implies --graal)'
@@ -198,6 +197,7 @@ def help
puts 'jt e 14 + 2 evaluate an expression'
puts 'jt puts 14 + 2 evaluate and print an expression'
puts 'jt test run all mri tests and specs'
puts 'jt test tck run the Truffle Compatibility Kit tests'
puts 'jt test mri run mri tests'
puts 'jt test specs run all specs'
puts 'jt test specs fast run all specs except sub-processes, GC, sleep, ...'
@@ -227,22 +227,16 @@ def help
puts ' branch names are mangled - eg truffle-head becomes GRAAL_BIN_TRUFFLE_HEAD'
end

def build(*args)
mvn_args = []

if args.delete 'truffle'
mvn_args += ['-pl', 'truffle', 'package']
end

if args.delete '--no-tests'
mvn_args << '-DskipTests'
end

unless args.empty?
raise ArgumentError, args.inspect
def build(project = nil)
opts = %w[-DskipTests]
case project
when 'truffle'
mvn *opts, '-pl', 'truffle', 'package'
when nil
mvn *opts, 'package'
else
raise ArgumentError, project
end

mvn *mvn_args
end

def clean
@@ -253,9 +247,9 @@ def irb(*args)
run(*%w[-S irb], *args)
end

def rebuild(*args)
def rebuild
clean
build *args
build
end

def run(*args)
@@ -343,6 +337,7 @@ def test(*args)
test_mri
when 'pe' then test_pe(*rest)
when 'specs' then test_specs('run', *rest)
when 'tck' then test_tck
when 'mri' then test_mri(*rest)
else
if File.expand_path(path).start_with?("#{JRUBY_DIR}/test")
@@ -402,6 +397,11 @@ def test_specs(command, *args)
end
private :test_specs

def test_tck
mvn 'test'
end
private :test_tck

def tag(path, *args)
return tag_all(*args) if path == 'all'
test_specs('tag', path, *args)
@@ -522,14 +522,13 @@ def main(args)
exit
end

if ['build', 'rebuild'].include? args.first
build_args = [args.shift]

while ['truffle', '--no-tests'].include? args.first
build_args << args.shift
end

send(*build_args)
case args.first
when "rebuild"
send(args.shift)
when "build"
command = [args.shift]
command << args.shift if args.first == "truffle"
send(*command)
end

return if args.empty?