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

Commits on Sep 27, 2016

  1. Copy the full SHA
    c394026 View commit details
  2. [Truffle] JT: use exec() for the ruby command.

    * Let #run use system() so it can be composed and invoked multiple times.
    eregon committed Sep 27, 2016
    Copy the full SHA
    293c528 View commit details
Showing with 13 additions and 9 deletions.
  1. +13 −9 tool/jt.rb
22 changes: 13 additions & 9 deletions tool/jt.rb
Original file line number Diff line number Diff line change
@@ -160,7 +160,7 @@ def self.find_jruby

def self.find_repo(name)
[JRUBY_DIR, "#{JRUBY_DIR}/.."].each do |dir|
found = Dir.glob("#{dir}/#{name}*").first
found = Dir.glob("#{dir}/#{name}*").sort.first
return File.expand_path(found) if found
end
raise "Can't find the #{name} repo - clone it into the repository directory or its parent"
@@ -176,12 +176,12 @@ def self.find_benchmark(benchmark)

def self.find_gem(name)
["#{JRUBY_DIR}/lib/ruby/gems/shared/gems"].each do |dir|
found = Dir.glob("#{dir}/#{name}*").first
found = Dir.glob("#{dir}/#{name}*").sort.first
return File.expand_path(found) if found
end

[JRUBY_DIR, "#{JRUBY_DIR}/.."].each do |dir|
found = Dir.glob("#{dir}/#{name}").first
found = Dir.glob("#{dir}/#{name}").sort.first
return File.expand_path(found) if found
end
raise "Can't find the #{name} gem - gem install it in this repository, or put it in the repository directory or its parent"
@@ -628,7 +628,11 @@ def run(*args)

raw_sh env_vars, Utilities.find_jruby, *jruby_args, *args
end
alias ruby run

# Same as #run but uses exec()
def ruby(*args)
run(*args, '--exec')
end

def e(*args)
run '-e', args.join(' ')
@@ -666,7 +670,7 @@ def cextc(cext_dir, *clang_opts)
src = replace_env_vars(config['src'])
# Expand relative to the cext directory
src = File.expand_path(src, cext_dir)
src_files = Dir[src]
src_files = Dir[src].sort
raise "No source files found in #{src}!" if src_files.empty?

config_cflags = config['cflags'] || ''
@@ -776,7 +780,7 @@ def test_compiler(*args)

env = { "JRUBY_OPTS" => jruby_opts.join(' ') }

Dir["#{JRUBY_DIR}/test/truffle/compiler/*.sh"].each do |test_script|
Dir["#{JRUBY_DIR}/test/truffle/compiler/*.sh"].sort.each do |test_script|
sh env, test_script
end
end
@@ -883,7 +887,7 @@ def test_integration(env={}, *args)
single_test = !args.empty?
test_names = single_test ? '{' + args.join(',') + '}' : '*'

Dir["#{tests_path}/#{test_names}.sh"].each do |test_script|
Dir["#{tests_path}/#{test_names}.sh"].sort.each do |test_script|
sh env_vars, test_script
end
end
@@ -904,7 +908,7 @@ def test_gems(env={}, *args)
single_test = !args.empty?
test_names = single_test ? '{' + args.join(',') + '}' : '*'

Dir["#{tests_path}/#{test_names}.sh"].each do |test_script|
Dir["#{tests_path}/#{test_names}.sh"].sort.each do |test_script|
next if test_script.end_with?('/install-gems.sh')
sh env_vars, test_script
end
@@ -925,7 +929,7 @@ def test_ecosystem(env={}, *args)
single_test = !args.empty?
test_names = single_test ? '{' + args.join(',') + '}' : '*'

Dir["#{tests_path}/#{test_names}.sh"].each do |test_script|
Dir["#{tests_path}/#{test_names}.sh"].sort.each do |test_script|
sh env_vars, test_script
end
end