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: cd3a8b8d6d31
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5356ec193fca
Choose a head ref
  • 8 commits
  • 13 files changed
  • 1 contributor

Commits on May 15, 2016

  1. Copy the full SHA
    45684a1 View commit details
  2. Copy the full SHA
    4995c09 View commit details
  3. Copy the full SHA
    4295801 View commit details
  4. Copy the full SHA
    9c2df36 View commit details
  5. Copy the full SHA
    7ff4276 View commit details
  6. [Truffle] reenable gem tests

    pitr-ch committed May 15, 2016
    Copy the full SHA
    28674d6 View commit details
  7. Copy the full SHA
    010c05d View commit details
  8. [Truffle] jt: formatting

    pitr-ch committed May 15, 2016
    Copy the full SHA
    5356ec1 View commit details
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -96,7 +96,6 @@ matrix:
jdk: oraclejdk8
- env: PHASE='-Pj2ee'
jdk: oraclejdk7
- env: JT='test gems' JAVA_OPTS="$JAVA_OPTS -Xmx512m" HAS_REDIS=true
# NOTE: build seems to never start (waited for any to finish for more than a day) - probably a travis-ci bug
#- env: PHASE='-Pmain'
# sudo: required
2 changes: 1 addition & 1 deletion lib/ruby/truffle/jruby+truffle/gem_ci/activemodel.rb
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
repository_name 'rails'

git_clone 'https://github.com/rails/rails.git' unless File.exists? repository_dir
git_checkout git_tag('4.2.5.2')
git_checkout git_tag('4.2.6')

use_only_https_git_paths!

2 changes: 1 addition & 1 deletion lib/ruby/truffle/jruby+truffle/gem_ci/activesupport.rb
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
repository_name 'rails'

git_clone 'https://github.com/rails/rails.git' unless File.exists? repository_dir
git_checkout git_tag('4.2.5.2')
git_checkout git_tag('4.2.6')

use_only_https_git_paths!

Original file line number Diff line number Diff line change
@@ -141,6 +141,9 @@
# do not let bundler to install db gem group
:without:
- db
:before:
# temporary workaround, rake 10.4.2 will not install
- ruby -e 'File.write "../Gemfile.lock", File.read("../Gemfile.lock").gsub(/rake \(10\.4\.2\)/,"rake (11.1.2)")'
:run:
:require:
- rubygems
Original file line number Diff line number Diff line change
@@ -65,6 +65,9 @@
# do not let bundler to install db gem group
:without:
- db
:before:
# temporary workaround, rake 10.4.2 will not install
- ruby -e 'File.write "../Gemfile.lock", File.read("../Gemfile.lock").gsub(/rake \(10\.4\.2\)/,"rake (11.1.2)")'
:run:
:require:
- rubygems
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module Truffle

def self.exclude_rspec_examples(exclusions)
exclusions.each do |mod_name, tests|

a_module = Object.const_get mod_name

Array(tests).each do |test|
puts "Excluding: #{a_module}##{test}"
a_module.send :undef_method, test
a_module.send :define_method, test do
skip 'excluded test'
end
end

end
end

end
9 changes: 7 additions & 2 deletions lib/ruby/truffle/jruby+truffle/lib/truffle/runner.rb
Original file line number Diff line number Diff line change
@@ -120,6 +120,7 @@ module OptionBlocks
},
setup: {
help: ['-h', '--help', 'Show this message', STORE_NEW_VALUE, false],
before: ['--before SH_CMD', 'Commands to execute before setup', ADD_TO_ARRAY, []],
after: ['--after SH_CMD', 'Commands to execute after setup', ADD_TO_ARRAY, []],
file: ['--file NAME,CONTENT', Array, 'Create file in truffle_bundle_path', MERGE_TO_HASH, {}],
without: ['--without GROUP', 'Do not install listed gem group by bundler', ADD_TO_ARRAY, []]
@@ -181,8 +182,8 @@ module OptionBlocks

run_help = <<-TXT.gsub(/^ {6}/, '')
Usage: #{EXECUTABLE} [options] run [subcommand-options] -- [ruby-options]
Usage: #{EXECUTABLE} [options] run [subcommand-options] -- [prepended-ruby-options] -- [appended-ruby-options]
Usage: #{EXECUTABLE} [options] run [subcommand-options] -- [ruby-options] [RUBY-FILE]
Usage: #{EXECUTABLE} [options] run [subcommand-options] -- [prepended-ruby-options] -- [appended-ruby-options] [RUBY-FILE]
Usage: #{EXECUTABLE} [options] run [subcommand-options] -S GEM_EXECUTABLE -- [ruby-options] -- [gem-executable-options]
Usage: #{EXECUTABLE} [options] run [subcommand-options] -S GEM_EXECUTABLE -- [gem-executable-options]
('--' divides different kind of options)
@@ -384,6 +385,10 @@ def subcommand_setup(rest)
bundle_options = @options[:global][:bundle_options].split(' ')
bundle_path = File.expand_path(@options[:global][:truffle_bundle_path])

@options[:setup][:before].each do |cmd|
execute_cmd cmd
end

bundle_cli([*bundle_options,
'install',
'--standalone',
File renamed without changes.
2 changes: 1 addition & 1 deletion test/truffle/gems/rack-server.sh
Original file line number Diff line number Diff line change
@@ -3,5 +3,5 @@
set -e

bin/jruby bin/gem install rack -v 1.6.1
source test/truffle/gems/common/test_server.sh.inc
source test/truffle/common/test_server.sh.inc
ruby -X+T -Ilib/ruby/gems/shared/gems/rack-1.6.1/lib test/truffle/gems/rack-server/rack-server.rb & test_server
2 changes: 1 addition & 1 deletion test/truffle/gems/sinatra-server.sh
Original file line number Diff line number Diff line change
@@ -6,5 +6,5 @@ bin/jruby bin/gem install rack -v 1.6.1
bin/jruby bin/gem install tilt -v 2.0.1
bin/jruby bin/gem install rack-protection -v 1.5.3
bin/jruby bin/gem install sinatra -v 1.4.6
source test/truffle/gems/common/test_server.sh.inc
source test/truffle/common/test_server.sh.inc
ruby -X+T -Ilib/ruby/gems/shared/gems/rack-1.6.1/lib -Ilib/ruby/gems/shared/gems/tilt-2.0.1/lib -Ilib/ruby/gems/shared/gems/rack-protection-1.5.3/lib -Ilib/ruby/gems/shared/gems/sinatra-1.4.6/lib test/truffle/gems/sinatra-server/sinatra-server.rb & test_server
2 changes: 1 addition & 1 deletion test/truffle/integration/tcp-server.sh
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

set -e

source test/truffle/integration/common/test_server.sh.inc
source test/truffle/common/test_server.sh.inc
ruby -X+T test/truffle/integration/tcp-server/tcp-server.rb & test_server
2 changes: 1 addition & 1 deletion test/truffle/integration/webrick-server.sh
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@

set -e

source test/truffle/integration/common/test_server.sh.inc
source test/truffle/common/test_server.sh.inc
ruby -X+T test/truffle/integration/webrick-server/webrick-server.rb & test_server
42 changes: 21 additions & 21 deletions tool/jt.rb
Original file line number Diff line number Diff line change
@@ -64,18 +64,18 @@ def self.find_graal
end
raise "couldn't find graal - download it as described in https://github.com/jruby/jruby/wiki/Downloading-GraalVM and extract it into the JRuby repository or parent directory"
end

def self.find_sulong_graal(dir)
searches = [
"#{dir}/../jvmci/jdk*/product/bin/java",
"#{dir}/../graal-core/mx.imports/binary/jvmci/jdk*/product/bin/java"
]

searches.each do |search|
java = Dir[search].first
return java if java
end

raise "couldn't find the Java build in the Sulong repository - you need to check it out and build it"
end

@@ -134,7 +134,7 @@ def self.git_branch
def self.mangle_for_env(name)
name.upcase.tr('-', '_')
end

def self.find_jvmci
jvmci_locations = [
ENV['JVMCI_DIR'],
@@ -149,7 +149,7 @@ def self.find_jvmci
Dir.exist?(location)
end
end

def self.igv_running?
`ps ax`.include?('IdealGraphVisualizer')
end
@@ -168,14 +168,14 @@ def self.ensure_igv_running
puts "-------------"
puts
puts

sleep 3

until igv_running?
puts 'still waiting for IGV to appear in ps ax...'
sleep 3
end

puts 'just a few more seconds...'
sleep 6
end
@@ -414,7 +414,7 @@ def run(*args)
if args.delete('--sulong')
dir = Utilities.find_sulong_dir
env_vars["JAVACMD"] = Utilities.find_sulong_graal(dir)

if ENV["SULONG_CLASSPATH"]
jruby_args << '-J-classpath' << ENV["SULONG_CLASSPATH"]
else
@@ -484,8 +484,8 @@ def test(*args)
test_tck
test_specs('run')
# test_mri # TODO (pitr-ch 29-Mar-2016): temporarily disabled since it uses refinements
test_integration ({})
test_gems ({ 'HAS_REDIS' => 'true' })
test_integration
test_gems('HAS_REDIS' => 'true')
test_compiler
test_cexts if ENV['SULONG_DIR']
when 'compiler' then test_compiler(*rest)
@@ -528,19 +528,19 @@ def test_compiler(*args)
jruby_opts = []
jruby_opts << '-J-Djvmci.Compiler=graal'
jruby_opts << '-Xtruffle.graal.warn_unless=false'

if ENV['GRAAL_JS_JAR']
jruby_opts << '-J-classpath'
jruby_opts << Utilities.find_graal_js
end

jruby_opts << '-Xtruffle.exceptions.print_java=true'

env_vars = {}
env_vars["JAVACMD"] = Utilities.find_graal unless args.delete('--no-java-cmd')
env_vars["JRUBY_OPTS"] = jruby_opts.join(' ')
env_vars["PATH"] = "#{Utilities.find_jruby_bin_dir}:#{ENV["PATH"]}"

Dir["#{JRUBY_DIR}/test/truffle/compiler/*.sh"].each do |test_script|
sh env_vars, test_script
end
@@ -746,7 +746,7 @@ def metrics(command, *args)
raise ArgumentError, command
end
end

def metrics_alloc(score_name, *args)
samples = []
METRICS_REPS.times do
@@ -781,7 +781,7 @@ def memory_allocated(trace)
end
allocated
end

def metrics_minheap(score_name, *args)
heap = 10
log '>', "Trying #{heap} MB"
@@ -813,11 +813,11 @@ def metrics_minheap(score_name, *args)
puts "#{heap} MB"
end
end

def can_run_in_heap(heap, *command)
run("-J-Xmx#{heap}M", *command, {err: '/dev/null', out: '/dev/null'}, :continue_on_failure, :no_print_cmd)
end

def metrics_time(score_name, *args)
samples = []
METRICS_REPS.times do
@@ -883,7 +883,7 @@ def human_size(bytes)
"#{(bytes/1024.0**4).round(2)} TB"
end
end

def tarball
mvn '-Pdist'
generated_file = "#{JRUBY_DIR}/maven/jruby-dist/target/jruby-dist-#{Utilities.jruby_version}-bin.tar.gz"
@@ -892,7 +892,7 @@ def tarball
FileUtils.copy "#{generated_file}.sha256", "#{final_file}.sha256"
sh 'test/truffle/tarball.sh', final_file
end

def log(tty_message, full_message)
if STDOUT.tty?
print(tty_message) unless tty_message.nil?