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

Commits on Jul 19, 2016

  1. Copy the full SHA
    82d3c4b View commit details
  2. Copy the full SHA
    a76f954 View commit details
  3. Copy the full SHA
    e0f4006 View commit details
  4. [Truffle] remove unused stub

    pitr-ch committed Jul 19, 2016
    Copy the full SHA
    f60d377 View commit details
  5. [Truffle] add minitest-reporters to rails tests

    to see which tests are getting stuck
    pitr-ch committed Jul 19, 2016
    Copy the full SHA
    610707b View commit details
  6. Copy the full SHA
    ac85445 View commit details
  7. [Truffle] add missing io/wait

    pitr-ch committed Jul 19, 2016
    Copy the full SHA
    cd6a7c9 View commit details
  8. Copy the full SHA
    63b9d02 View commit details
  9. Copy the full SHA
    66be880 View commit details
  10. Copy the full SHA
    a0904f9 View commit details
  11. Copy the full SHA
    2ee2207 View commit details
  12. Copy the full SHA
    4c4f42b View commit details
  13. Copy the full SHA
    4e574e9 View commit details
  14. Copy the full SHA
    f02f33d View commit details
  15. Copy the full SHA
    85ed8e0 View commit details
  16. Copy the full SHA
    7295f48 View commit details
  17. [Truffle] fix formatting

    pitr-ch committed Jul 19, 2016
    Copy the full SHA
    118f721 View commit details
  18. Copy the full SHA
    bcde0ab View commit details
  19. Copy the full SHA
    3d35826 View commit details
  20. Copy the full SHA
    a3e9e3e View commit details
Showing with 157 additions and 3,242 deletions.
  1. +1 −0 .travis.yml
  2. +40 −30 ci.hocon
  3. +5 −1 lib/ruby/truffle/jruby+truffle/lib/truffle/actionpack_exclusions.yaml
  4. +24 −18 lib/ruby/truffle/jruby+truffle/lib/truffle/config.rb
  5. +15 −15 lib/ruby/truffle/jruby+truffle/lib/truffle/runner.rb
  6. +19 −0 lib/ruby/truffle/truffle/io/wait.rb
  7. +3 −0 lib/ruby/truffle/truffle/openssl-stubs.rb
  8. +7 −0 test/truffle/ecosystem-travis-install.sh
  9. +0 −4 test/truffle/ecosystem/batch.txt
  10. +9 −0 test/truffle/ecosystem/batch.yaml
  11. +0 −8 test/truffle/ecosystem/ecosystem.sh
  12. +5 −0 test/truffle/ecosystem/gem-testing.sh
  13. +3 −3 test/truffle/ecosystem/rails-app.sh
  14. +0 −8 test/truffle/ecosystem/rails-app/.gitignore
  15. +0 −57 test/truffle/ecosystem/rails-app/.jruby+truffle.yaml
  16. +0 −25 test/truffle/ecosystem/rails-app/Gemfile
  17. +0 −128 test/truffle/ecosystem/rails-app/Gemfile.lock
  18. +0 −6 test/truffle/ecosystem/rails-app/Rakefile
  19. 0 test/truffle/ecosystem/rails-app/app/assets/images/.keep
  20. +0 −15 test/truffle/ecosystem/rails-app/app/assets/stylesheets/application.css
  21. +0 −5 test/truffle/ecosystem/rails-app/app/controllers/application_controller.rb
  22. 0 test/truffle/ecosystem/rails-app/app/controllers/concerns/.keep
  23. +0 −56 test/truffle/ecosystem/rails-app/app/controllers/people_controller.rb
  24. +0 −2 test/truffle/ecosystem/rails-app/app/helpers/application_helper.rb
  25. 0 test/truffle/ecosystem/rails-app/app/models/concerns/.keep
  26. +0 −21 test/truffle/ecosystem/rails-app/app/models/person.rb
  27. +0 −26 test/truffle/ecosystem/rails-app/app/views/layouts/application.html.erb
  28. +0 −55 test/truffle/ecosystem/rails-app/app/views/people/index.erb
  29. +0 −3 test/truffle/ecosystem/rails-app/bin/bundle
  30. +0 −4 test/truffle/ecosystem/rails-app/bin/rails
  31. +0 −4 test/truffle/ecosystem/rails-app/bin/rake
  32. +0 −29 test/truffle/ecosystem/rails-app/bin/setup
  33. +0 −4 test/truffle/ecosystem/rails-app/config.ru
  34. +0 −39 test/truffle/ecosystem/rails-app/config/application.rb
  35. +0 −3 test/truffle/ecosystem/rails-app/config/boot.rb
  36. +0 −23 test/truffle/ecosystem/rails-app/config/database.yml
  37. +0 −5 test/truffle/ecosystem/rails-app/config/environment.rb
  38. +0 −25 test/truffle/ecosystem/rails-app/config/environments/development.rb
  39. +0 −64 test/truffle/ecosystem/rails-app/config/environments/production.rb
  40. +0 −42 test/truffle/ecosystem/rails-app/config/environments/test.rb
  41. +0 −7 test/truffle/ecosystem/rails-app/config/initializers/backtrace_silencers.rb
  42. +0 −3 test/truffle/ecosystem/rails-app/config/initializers/cookies_serializer.rb
  43. +0 −4 test/truffle/ecosystem/rails-app/config/initializers/filter_parameter_logging.rb
  44. +0 −20 test/truffle/ecosystem/rails-app/config/initializers/inflections.rb
  45. +0 −4 test/truffle/ecosystem/rails-app/config/initializers/mime_types.rb
  46. +0 −3 test/truffle/ecosystem/rails-app/config/initializers/session_store.rb
  47. +0 −9 test/truffle/ecosystem/rails-app/config/initializers/wrap_parameters.rb
  48. +0 −23 test/truffle/ecosystem/rails-app/config/locales/en.yml
  49. +0 −61 test/truffle/ecosystem/rails-app/config/routes.rb
  50. +0 −22 test/truffle/ecosystem/rails-app/config/secrets.yml
  51. 0 test/truffle/ecosystem/rails-app/lib/assets/.keep
  52. 0 test/truffle/ecosystem/rails-app/lib/tasks/.keep
  53. 0 test/truffle/ecosystem/rails-app/log/.keep
  54. +0 −67 test/truffle/ecosystem/rails-app/public/404.html
  55. +0 −67 test/truffle/ecosystem/rails-app/public/422.html
  56. +0 −66 test/truffle/ecosystem/rails-app/public/500.html
  57. 0 test/truffle/ecosystem/rails-app/public/favicon.ico
  58. +0 −5 test/truffle/ecosystem/rails-app/public/robots.txt
  59. +0 −3 test/truffle/ecosystem/rails-app/public/stylesheets/application.css
  60. +0 −2,122 test/truffle/ecosystem/rails-app/public/stylesheets/kube.css
  61. 0 test/truffle/ecosystem/rails-app/test/controllers/.keep
  62. 0 test/truffle/ecosystem/rails-app/test/fixtures/.keep
  63. 0 test/truffle/ecosystem/rails-app/test/helpers/.keep
  64. 0 test/truffle/ecosystem/rails-app/test/integration/.keep
  65. 0 test/truffle/ecosystem/rails-app/test/mailers/.keep
  66. 0 test/truffle/ecosystem/rails-app/test/models/.keep
  67. +0 −7 test/truffle/ecosystem/rails-app/test/test_helper.rb
  68. 0 test/truffle/ecosystem/rails-app/vendor/assets/javascripts/.keep
  69. 0 test/truffle/ecosystem/rails-app/vendor/assets/stylesheets/.keep
  70. +26 −21 tool/jt.rb
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -91,6 +91,7 @@ matrix:
- env:
- JAVA_OPTS="$JAVA_OPTS -Xmx512m"
- HAS_REDIS=true
- COMMAND=test/truffle/ecosystem-travis-install.sh
- JT='test ecosystem'
jdk: oraclejdk8
- env: JT='test tck'
70 changes: 40 additions & 30 deletions ci.hocon
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ jt: [ruby, tool/jt.rb]
common-setup: [
[mx, sclone, --kind, git, "https://github.com/jruby/jruby-build-pack.git", jruby-build-pack],
[cp, bin/jruby.bash, bin/jruby],
[chmod, +x, bin/jruby],
[chmod, "+x", bin/jruby],
${jt} [build, --offline]
]

@@ -15,12 +15,12 @@ common: {
ruby: ">=2.1.0"
"java/jdk": "==1.8.0/60"
}

environment: {
CI: "true",
JAVA_OPTS: -Xmx2G
}

setup: ${common-setup}

timelimit: "00:30:00"
@@ -47,7 +47,7 @@ graal-core: {
[cd, ../..],
[mv, temp_mx, mx.jruby]
]

environment: {
GRAALVM_BIN: graal-workspace/jvmci/jdk1.8.0_60/product/bin/java, // temporarily looks like GraalVM - will use GRAAL_HOME after next GraalVM release
HOST_VM: server,
@@ -70,7 +70,7 @@ graal-enterprise: {
[cd, ../..],
[mv, temp_mx, mx.jruby]
]

environment: {
GRAALVM_BIN: graal-workspace/jvmci/jdk1.8.0_60/product/bin/java, // temporarily looks like GraalVM - will use GRAAL_HOME after next GraalVM release
HOST_VM: server,
@@ -80,7 +80,7 @@ graal-enterprise: {

graal-enterprise-no-om: {
setup: ${graal-enterprise.setup}

environment: {
GRAALVM_BIN: graal-workspace/jvmci/jdk1.8.0_60/product/bin/java, // temporarily looks like GraalVM - will use GRAAL_HOME after next GraalVM release
HOST_VM: server,
@@ -97,7 +97,7 @@ graal-vm: {
platformspecific: true
}
}

environment: {
GRAALVM_BIN: "$GRAALVM_DIR/bin/java"
HOST_VM: server,
@@ -232,39 +232,48 @@ server-benchmarks: {
packages: {
"apache/ab": ">=2.3"
}

run: ${setup-benchmarks} [
[mx, benchmark, server]
] ${post-process-and-upload-results}
}

test-gems: {
environment: {
GEM_HOME: jruby-truffle-gem-test-pack/gems
}

jruby-truffle-gem-test-pack: {
setup: ${common-setup} [
[mx, sclone, --kind, git, "https://github.com/jruby/jruby-truffle-gem-test-pack.git", jruby-truffle-gem-test-pack]
[mx, sclone, --kind, git, "https://github.com/jruby/jruby-truffle-gem-test-pack.git", ../jruby-truffle-gem-test-pack]
]

}

test-gems: ${jruby-truffle-gem-test-pack} {
environment: {
GEM_HOME: ../jruby-truffle-gem-test-pack/gems
}

run: [
${jt} [test, gems]
]
}

test-ecosystem: ${jruby-truffle-gem-test-pack} {
run: [
[bin/jruby, bin/gem, install, ../jruby-truffle-gem-test-pack/gems/cache/bundler-1.12.5.gem],
${jt} [test, ecosystem]
]
}

test-cexts: {
packages: {
llvm: "==3.3"
}

downloads: {
JVMCI_JAVA_HOME: {
name: labsjdk,
version: "8u92-jvmci-0.17",
platformspecific: true
}
}

setup: ${common-setup} [
[mv, mx.jruby, temp_mx],
[mkdir, sulong-workspace],
@@ -278,7 +287,7 @@ test-cexts: {
[mx, sclone, --kind, git, "https://github.com/jruby/jruby-truffle-gem-test-pack.git", jruby-truffle-gem-test-pack],
${jt} [build, cexts]
]

environment: {
GEM_HOME: jruby-truffle-gem-test-pack/gems
GRAAL_HOME: sulong-workspace/sulong,
@@ -287,7 +296,7 @@ test-cexts: {
HOST_VM: server,
HOST_VM_CONFIG: graal-core
}

run: [
${jt} [test, specs, --graal, ":capi"],
${jt} [test, cexts]
@@ -304,15 +313,15 @@ sulong-benchmarks: {
packages: {
llvm: "==3.3"
}

downloads: {
JVMCI_JAVA_HOME: {
name: labsjdk,
version: "8u92-jvmci-0.17",
platformspecific: true
}
}

setup: ${common-setup} [
[mv, mx.jruby, temp_mx],
[mkdir, sulong-workspace],
@@ -327,7 +336,7 @@ sulong-benchmarks: {
] ${setup-benchmarks} [
${jt} [cextc, all-ruby-benchmarks/chunky_png/oily_png]
]

environment: {
GRAAL_HOME: sulong-workspace/sulong,
SULONG_HOME: sulong-workspace/sulong,
@@ -349,28 +358,29 @@ builds: [
{name: ruby-test-integration} ${common} ${gate-caps} {run: [${jt} [test, integration]]},
{name: ruby-test-cexts} ${common} ${gate-caps} ${test-cexts},
{name: ruby-test-gems} ${common} ${gate-caps} ${test-gems},
{name: ruby-test-ecosystem} ${common} ${gate-caps} ${test-ecosystem},
{name: ruby-test-tarball} ${common} ${gate-caps} {run: [${jt} [tarball]]},

{name: ruby-test-compiler-graal-core} ${common} ${graal-core} ${gate-caps} {run: [${jt} [test, compiler]]},
{name: ruby-test-compiler-graal-enterprise} ${common} ${graal-enterprise} ${gate-caps} {run: [${jt} [test, compiler]]},
{name: ruby-test-compiler-graal-vm} ${common} ${graal-vm} ${gate-caps} {run: [${jt} [test, compiler]]},

{name: ruby-metrics-noindy} ${common} ${no-graal} ${daily-bench-caps} ${jruby-noindy-metrics} ${metrics},
{name: ruby-metrics-indy} ${common} ${no-graal} ${daily-bench-caps} ${jruby-indy-metrics} ${metrics},
{name: ruby-metrics-truffle} ${common} ${no-graal} ${bench-caps} ${jruby-truffle} ${metrics},
{name: ruby-metrics-compiler-graal-core} ${common} ${graal-core} ${bench-caps} ${jruby-truffle} ${compiler-metrics},
{name: ruby-metrics-compiler-graal-enterprise} ${common} ${graal-enterprise} ${bench-caps} ${jruby-truffle} ${compiler-metrics},
{name: ruby-metrics-compiler-graal-enterprise-no-om} ${common} ${graal-enterprise-no-om} ${bench-caps} ${jruby-truffle} ${compiler-metrics},
{name: ruby-metrics-compiler-graal-vm} ${common} ${graal-vm} ${daily-bench-caps} ${jruby-truffle} ${compiler-metrics},

{name: ruby-benchmarks-classic-noindy} ${common} ${no-graal} ${daily-bench-caps} ${jruby-noindy-benchmark} ${classic-benchmarks},
{name: ruby-benchmarks-classic-indy} ${common} ${no-graal} ${daily-bench-caps} ${jruby-indy-benchmark} ${classic-benchmarks},
{name: ruby-benchmarks-classic-no-graal} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-truffle} ${classic-benchmarks},
{name: ruby-benchmarks-classic-graal-core} ${common} ${graal-core} ${bench-caps} ${jruby-truffle} ${classic-benchmarks},
{name: ruby-benchmarks-classic-graal-enterprise} ${common} ${graal-enterprise} ${bench-caps} ${jruby-truffle} ${classic-benchmarks},
{name: ruby-benchmarks-classic-graal-enterprise-no-om} ${common} ${graal-enterprise-no-om} ${bench-caps} ${jruby-truffle} ${classic-benchmarks},
{name: ruby-benchmarks-classic-graal-vm} ${common} ${graal-vm} ${daily-bench-caps} ${jruby-truffle} ${classic-benchmarks},

{name: ruby-benchmarks-chunky-noindy} ${common} ${no-graal} ${daily-bench-caps} ${jruby-noindy-benchmark} ${chunky-benchmarks},
{name: ruby-benchmarks-chunky-indy} ${common} ${no-graal} ${daily-bench-caps} ${jruby-indy-benchmark} ${chunky-benchmarks},
{name: ruby-benchmarks-chunky-no-graal} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-truffle} ${chunky-benchmarks},
@@ -379,31 +389,31 @@ builds: [
{name: ruby-benchmarks-chunky-graal-enterprise-no-om} ${common} ${graal-enterprise-no-om} ${bench-caps} ${jruby-truffle} ${chunky-benchmarks},
{name: ruby-benchmarks-chunky-graal-vm} ${common} ${graal-vm} ${daily-bench-caps} ${jruby-truffle} ${chunky-benchmarks},
//{name: ruby-benchmarks-chunky-sulong} ${common} ${sulong-benchmarks} ${gate-caps} ${jruby-truffle} ${chunky-benchmarks-x},

{name: ruby-benchmarks-psd-noindy} ${common} ${no-graal} ${daily-bench-caps} ${jruby-noindy-benchmark} ${psd-benchmarks},
{name: ruby-benchmarks-psd-indy} ${common} ${no-graal} ${daily-bench-caps} ${jruby-indy-benchmark} ${psd-benchmarks},
{name: ruby-benchmarks-psd-no-graal} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-truffle} ${psd-benchmarks},
{name: ruby-benchmarks-psd-graal-core} ${common} ${graal-core} ${bench-caps} ${jruby-truffle} ${psd-benchmarks},
{name: ruby-benchmarks-psd-graal-enterprise} ${common} ${graal-enterprise} ${bench-caps} ${jruby-truffle} ${psd-benchmarks},
{name: ruby-benchmarks-psd-graal-enterprise-no-om} ${common} ${graal-enterprise-no-om} ${bench-caps} ${jruby-truffle} ${psd-benchmarks},
{name: ruby-benchmarks-psd-graal-vm} ${common} ${graal-vm} ${daily-bench-caps} ${jruby-truffle} ${psd-benchmarks},

{name: ruby-benchmarks-synthetic-noindy} ${common} ${no-graal} ${daily-bench-caps} ${jruby-noindy-benchmark} ${synthetic-benchmarks},
{name: ruby-benchmarks-synthetic-indy} ${common} ${no-graal} ${daily-bench-caps} ${jruby-indy-benchmark} ${synthetic-benchmarks},
{name: ruby-benchmarks-synthetic-no-graal} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-truffle} ${synthetic-benchmarks},
{name: ruby-benchmarks-synthetic-graal-core} ${common} ${graal-core} ${bench-caps} ${jruby-truffle} ${synthetic-benchmarks},
{name: ruby-benchmarks-synthetic-graal-enterprise} ${common} ${graal-enterprise} ${bench-caps} ${jruby-truffle} ${synthetic-benchmarks},
{name: ruby-benchmarks-synthetic-graal-enterprise-no-om} ${common} ${graal-enterprise-no-om} ${bench-caps} ${jruby-truffle} ${synthetic-benchmarks},
{name: ruby-benchmarks-synthetic-graal-vm} ${common} ${graal-vm} ${daily-bench-caps} ${jruby-truffle} ${synthetic-benchmarks},

{name: ruby-benchmarks-micro-noindy} ${common} ${no-graal} ${daily-bench-caps} ${jruby-noindy-benchmark} ${micro-benchmarks},
{name: ruby-benchmarks-micro-indy} ${common} ${no-graal} ${daily-bench-caps} ${jruby-indy-benchmark} ${micro-benchmarks},
{name: ruby-benchmarks-micro-no-graal} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-truffle} ${micro-benchmarks},
{name: ruby-benchmarks-micro-graal-core} ${common} ${graal-core} ${bench-caps} ${jruby-truffle} ${micro-benchmarks},
{name: ruby-benchmarks-micro-graal-enterprise} ${common} ${graal-enterprise} ${bench-caps} ${jruby-truffle} ${micro-benchmarks},
{name: ruby-benchmarks-micro-graal-enterprise-no-om} ${common} ${graal-enterprise-no-om} ${bench-caps} ${jruby-truffle} ${micro-benchmarks},
{name: ruby-benchmarks-micro-graal-vm} ${common} ${graal-vm} ${daily-bench-caps} ${jruby-truffle} ${micro-benchmarks},

{name: ruby-benchmarks-server-noindy} ${common} ${no-graal} ${daily-bench-caps} ${jruby-noindy-benchmark} ${server-benchmarks},
{name: ruby-benchmarks-server-indy} ${common} ${no-graal} ${daily-bench-caps} ${jruby-indy-benchmark} ${server-benchmarks},
{name: ruby-benchmarks-server-no-graal} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-truffle} ${server-benchmarks},
Original file line number Diff line number Diff line change
@@ -83,7 +83,11 @@ TestGenerationPrefix::WithMountedEngine:
- test_[ENGINE]_relative_path_redirect_uses_SCRIPT_NAME_from_request
ActionController::LiveStreamTest:
- test_exception_callback_when_committed
- test_abort_with_full_buffer # hangs
- test_abort_with_full_buffer # hangs sometimes
- test_async_stream # intermittent on travis
- test_stale_without_etag # hangs sometimes
ApplicationIntegrationTest:
- test_missing_route_helper_after_controller_access
- test_missing_route_helper_before_controller_access
HttpDigestAuthenticationTest:
- authentication_request_with_invalid_realm # hangs sometimes
42 changes: 24 additions & 18 deletions lib/ruby/truffle/jruby+truffle/lib/truffle/config.rb
Original file line number Diff line number Diff line change
@@ -5,14 +5,6 @@
include Truffle::Runner::OptionBlocks

stubs = {
# TODO (pitr-ch 23-Jun-2016): remove? it's not used any more
minitest: dedent(<<-RUBY),
require 'minitest'
# mock load_plugins as it loads rubygems
def Minitest.load_plugins
end
RUBY

activesupport_isolation: dedent(<<-RUBY),
require 'active_support/testing/isolation'
@@ -132,20 +124,38 @@ def gem(gem_name, *requirements)
run: { require: [file_name] } }
end

additions = {
minitest_reporters: dedent(<<-RUBY)
require 'rbconfig'
# add minitest-reporters and its dependencies to $LOAD_PATH
path = File.expand_path('..', __FILE__)
%w[ansi-1.5.0 ruby-progressbar-1.8.0 minitest-reporters-1.1.9].each do |gem_dir|
$:.unshift "\#{path}/../\#{RUBY_ENGINE}/\#{RbConfig::CONFIG['ruby_version']}/gems/\#{gem_dir}/lib"
end
# activate
require "minitest/reporters"
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
RUBY
}.reduce({}) do |h, (k, v)|
file_name = format '%s.rb', k
h.update k => { setup: { file: { file_name => v } },
run: { require: [file_name] } }
end

replacements = {
bundler: dedent(<<-RUBY),
:bundler => dedent(<<-RUBY),
module Bundler
BundlerError = Class.new(Exception)
def self.setup
end
end
RUBY
:'bundler/gem_tasks' => nil,
java: nil,
bcrypt_ext: nil,
method_source: nil,
:java => nil,
:bcrypt_ext => nil,
:method_source => nil,
:'rails-html-sanitizer' => nil,
nokogiri: nil
:nokogiri => nil
}.reduce({}) do |h, (k, v)|
h.update k => { setup: { file: { "#{k}.rb" => v || %[puts "loaded '#{k}.rb' an empty replacement"] } } }
end
@@ -166,6 +176,7 @@ def exclusion_file(gem_name)
rails_common =
deep_merge replacements.fetch(:bundler),
stubs.fetch(:kernel_gem),
additions.fetch(:minitest_reporters),
setup: { without: %w(db job) },
run: { environment: { 'N' => 1 },
require: %w(rubygems date bigdecimal pathname openssl-stubs) }
@@ -182,7 +193,6 @@ def exclusion_file(gem_name)
stubs.fetch(:activesupport_isolation),
stubs.fetch(:bcrypt))

# TODO (pitr-ch 23-Jun-2016): investigate, fails intermittently
Truffle::Runner.add_config :actionpack,
deep_merge(
rails_common,
@@ -227,8 +237,6 @@ class Truffle::Runner::CIEnvironment
def rails_ci(exclude)
repository_name 'rails'

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

use_only_https_git_paths!

@@ -259,8 +267,6 @@ def rails_ci(exclude)
end

Truffle::Runner.add_ci_definition :algebrick do
git_clone 'https://github.com/pitr-ch/algebrick.git' unless File.exists? repository_dir
git_checkout git_tag '0.7.3'

has_to_succeed setup

30 changes: 15 additions & 15 deletions lib/ruby/truffle/jruby+truffle/lib/truffle/runner.rb
Original file line number Diff line number Diff line change
@@ -678,24 +678,24 @@ def subcommand_readme(rest)

def subcommand_ci(rest)
if (path = options[:ci][:batch])
batch = if path =~ /^in|stdin$/
$stdin.read
else
path = Pathname(path)
if path.absolute?
File.read(path)
else
File.read(Pathname(@called_from_dir).join(path))
end
end
batch_content = if path =~ /^in|stdin$/
$stdin.read
else
path = Pathname(path)
if path.absolute?
File.read(path)
else
File.read(Pathname(@called_from_dir).join(path))
end
end
cis_to_run = YAML.load(batch_content)

results = batch.each_line.map do |line|
# commented lines result in true
next true if line =~ /^#/ || line.strip.empty?
results = cis_to_run.map do |ci|
# ci is just a name or a array of name and options

options = {}
option_parser = build_option_parser OPTION_DEFINITIONS[:ci], options
rest = option_parser.order line.split
rest = option_parser.order Array(ci)

gem_name = rest.first
CIEnvironment.new(@options[:global][:dir], gem_name, self, rest[1..-1]).success?
@@ -900,7 +900,7 @@ def set_result(boolean)
end

def success?
!@result.nil?
@result
end

def use_only_https_git_paths!
19 changes: 19 additions & 0 deletions lib/ruby/truffle/truffle/io/wait.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
class IO
def nread
raise NotImplementedError
end

def ready?
not Kernel.select([self], [], [], 0).nil?
end

def wait(timeout = nil)
Kernel.select([self], [], [], timeout).nil? ? nil : self
end

alias_method :wait_readable, :wait

def wait_writable(timeout = nil)
Kernel.select([], [self], [], timeout).nil? ? nil : self
end
end
3 changes: 3 additions & 0 deletions lib/ruby/truffle/truffle/openssl-stubs.rb
Original file line number Diff line number Diff line change
@@ -95,6 +95,9 @@ def self.hexdigest(digest, key, data)
module SSL
SSLError = Class.new StandardError
end

class SSL::SSLSocket
end
end

# make it look as openssl is loaded
7 changes: 7 additions & 0 deletions test/truffle/ecosystem-travis-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

gem install bundler
git clone \
--branch master \
https://github.com/jruby/jruby-truffle-gem-test-pack.git \
../jruby-truffle-gem-test-pack
4 changes: 0 additions & 4 deletions test/truffle/ecosystem/batch.txt

This file was deleted.

9 changes: 9 additions & 0 deletions test/truffle/ecosystem/batch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# TODO (pitr-ch 19-Jul-2016): reenable after tests stop randomly hanging
# - actionpack

- activesupport
- activemodel
- algebrick

# - [gem_name, --option] # is alternative format
8 changes: 0 additions & 8 deletions test/truffle/ecosystem/ecosystem.sh

This file was deleted.

5 changes: 5 additions & 0 deletions test/truffle/ecosystem/gem-testing.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -e

jruby+truffle --dir ../jruby-truffle-gem-test-pack/gem-testing ci --offline --batch test/truffle/ecosystem/batch.yaml
6 changes: 3 additions & 3 deletions test/truffle/ecosystem/rails-app.sh
Original file line number Diff line number Diff line change
@@ -2,9 +2,9 @@

set -e

cd test/truffle/ecosystem/rails-app
cd ../jruby-truffle-gem-test-pack/gem-testing/rails-app

JRUBY_BIN=../../../../bin
JRUBY_BIN=../../../jruby/bin
JRUBY=$JRUBY_BIN/jruby
JTR=$JRUBY_BIN/jruby+truffle

@@ -22,7 +22,7 @@ else

$JRUBY $JRUBY_BIN/gem install bundler

$JTR setup
$JTR setup --offline
$JTR run -r rubygems -- bin/rails server &
serverpid=$!
url=http://localhost:3000
8 changes: 0 additions & 8 deletions test/truffle/ecosystem/rails-app/.gitignore

This file was deleted.

57 changes: 0 additions & 57 deletions test/truffle/ecosystem/rails-app/.jruby+truffle.yaml

This file was deleted.

25 changes: 0 additions & 25 deletions test/truffle/ecosystem/rails-app/Gemfile

This file was deleted.

128 changes: 0 additions & 128 deletions test/truffle/ecosystem/rails-app/Gemfile.lock

This file was deleted.

6 changes: 0 additions & 6 deletions test/truffle/ecosystem/rails-app/Rakefile

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

Empty file.
21 changes: 0 additions & 21 deletions test/truffle/ecosystem/rails-app/app/models/person.rb

This file was deleted.

This file was deleted.

55 changes: 0 additions & 55 deletions test/truffle/ecosystem/rails-app/app/views/people/index.erb

This file was deleted.

3 changes: 0 additions & 3 deletions test/truffle/ecosystem/rails-app/bin/bundle

This file was deleted.

4 changes: 0 additions & 4 deletions test/truffle/ecosystem/rails-app/bin/rails

This file was deleted.

4 changes: 0 additions & 4 deletions test/truffle/ecosystem/rails-app/bin/rake

This file was deleted.

29 changes: 0 additions & 29 deletions test/truffle/ecosystem/rails-app/bin/setup

This file was deleted.

4 changes: 0 additions & 4 deletions test/truffle/ecosystem/rails-app/config.ru

This file was deleted.

39 changes: 0 additions & 39 deletions test/truffle/ecosystem/rails-app/config/application.rb

This file was deleted.

3 changes: 0 additions & 3 deletions test/truffle/ecosystem/rails-app/config/boot.rb

This file was deleted.

23 changes: 0 additions & 23 deletions test/truffle/ecosystem/rails-app/config/database.yml

This file was deleted.

5 changes: 0 additions & 5 deletions test/truffle/ecosystem/rails-app/config/environment.rb

This file was deleted.

This file was deleted.

64 changes: 0 additions & 64 deletions test/truffle/ecosystem/rails-app/config/environments/production.rb

This file was deleted.

42 changes: 0 additions & 42 deletions test/truffle/ecosystem/rails-app/config/environments/test.rb

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

23 changes: 0 additions & 23 deletions test/truffle/ecosystem/rails-app/config/locales/en.yml

This file was deleted.

61 changes: 0 additions & 61 deletions test/truffle/ecosystem/rails-app/config/routes.rb

This file was deleted.

22 changes: 0 additions & 22 deletions test/truffle/ecosystem/rails-app/config/secrets.yml

This file was deleted.

Empty file.
Empty file.
Empty file.
67 changes: 0 additions & 67 deletions test/truffle/ecosystem/rails-app/public/404.html

This file was deleted.

67 changes: 0 additions & 67 deletions test/truffle/ecosystem/rails-app/public/422.html

This file was deleted.

66 changes: 0 additions & 66 deletions test/truffle/ecosystem/rails-app/public/500.html

This file was deleted.

Empty file.
5 changes: 0 additions & 5 deletions test/truffle/ecosystem/rails-app/public/robots.txt

This file was deleted.

This file was deleted.

2,122 changes: 0 additions & 2,122 deletions test/truffle/ecosystem/rails-app/public/stylesheets/kube.css

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
7 changes: 0 additions & 7 deletions test/truffle/ecosystem/rails-app/test/test_helper.rb

This file was deleted.

Empty file.
Empty file.
47 changes: 26 additions & 21 deletions tool/jt.rb
Original file line number Diff line number Diff line change
@@ -154,7 +154,7 @@ def self.find_repo(name)
end
raise "Can't find the #{name} repo - clone it into the repository directory or its parent"
end

def self.find_benchmark(benchmark)
if File.exist?(benchmark)
benchmark
@@ -168,7 +168,7 @@ def self.find_gem(name)
found = Dir.glob("#{dir}/#{name}*").first
return File.expand_path(found) if found
end

[JRUBY_DIR, "#{JRUBY_DIR}/.."].each do |dir|
found = Dir.glob("#{dir}/#{name}").first
return File.expand_path(found) if found
@@ -191,7 +191,7 @@ def self.ensure_igv_running
def self.jruby_version
File.read("#{JRUBY_DIR}/VERSION").strip
end

def self.human_size(bytes)
if bytes < 1024
"#{bytes} B"
@@ -225,7 +225,7 @@ def system_timeout(timeout, *args)
rescue SystemCallError
return nil
end

begin
Timeout.timeout timeout do
Process.waitpid pid
@@ -320,10 +320,10 @@ def mvn(*args)
else
options = []
end

sh *options, './mvnw', *(['-q'] + args)
end

def maven_options(*options)
maven_options = []
offline = options.delete('--offline')
@@ -333,7 +333,7 @@ def maven_options(*options)
end
return [maven_options, options]
end

def mx(dir, *args)
command = ['mx', '-p', dir]
command.push *['--java-home', ENV['JVMCI_JAVA_HOME']] if ENV['JVMCI_JAVA_HOME']
@@ -420,7 +420,8 @@ def help
puts 'jt test integration runs all integration tests'
puts 'jt test integration TESTS runs the given integration tests'
puts 'jt test gems tests using gems'
puts 'jt test ecosystem tests using the wider ecosystem such as bundler, Rails, etc'
puts 'jt test ecosystem [--offline] tests using the wider ecosystem such as bundler, Rails, etc'
puts ' (when --offline it will not use rubygems.org)'
puts 'jt test cexts run C extension tests'
puts ' (implies --graal, where Graal needs to include Sulong, set SULONG_HOME to a built checkout of Sulong, and set GEM_HOME)'
puts 'jt test report :language build a report on language specs'
@@ -482,7 +483,7 @@ def build(*options)
cextc "#{JRUBY_DIR}/truffle/src/main/c/cext"

openssl_home = ENV['OPENSSL_HOME'] || '/usr'

#cextc "#{JRUBY_DIR}/truffle/src/main/c/openssl",
# "-I#{openssl_home}/include",
# '-DRUBY_EXTCONF_H="extconf.h"',
@@ -510,13 +511,13 @@ def rebuild

def run(*args)
env_vars = args.first.is_a?(Hash) ? args.shift : {}

jruby_args = [
'-X+T',
"-Xtruffle.core.load_path=#{JRUBY_DIR}/truffle/src/main/ruby",
'-Xtruffle.graal.warn_unless=false'
]

if ENV['JRUBY_OPTS'] && ENV['JRUBY_OPTS'].include?('-Xclassic')
jruby_args.delete '-X+T'
end
@@ -571,11 +572,11 @@ def run(*args)
jruby_args += %w[-J-G:Dump=TrufflePartialEscape]
end
end

if args.delete('--no-print-cmd')
args << { no_print_cmd: true }
end

if args.delete('--exec')
args << { use_exec: true }
end
@@ -595,7 +596,7 @@ def command_puts(*args)
def command_p(*args)
e 'p begin', *args, 'end'
end

def cextc(cext_dir, *clang_opts)
config_file = File.join(cext_dir, '.jruby-cext-build.yml')

@@ -604,7 +605,7 @@ def cextc(cext_dir, *clang_opts)
end

config = YAML.load_file(config_file)

config_src = config['src']

if config_src.start_with?('$GEM_HOME/')
@@ -613,18 +614,18 @@ def cextc(cext_dir, *clang_opts)
else
src = Dir[File.join(cext_dir, config_src)]
end

config_cflags = config['cflags'] || ''
config_cflags = `echo #{config_cflags}`.strip
config_cflags = config_cflags.split(' ')

out = File.expand_path(config['out'], cext_dir)

lls = []

src.each do |src|
ll = File.join(File.dirname(out), File.basename(src, '.*') + '.ll')

clang "-I#{SULONG_HOME}/include", '-Ilib/ruby/truffle/cext', '-S', '-emit-llvm', *config_cflags, *clang_opts, src, '-o', ll
llvm_opt '-S', '-mem2reg', ll, '-o', ll

@@ -707,7 +708,7 @@ def test_compiler(*args)
jruby_opts << '-Xtruffle.exceptions.print_java=true'

no_java_cmd = args.delete('--no-java-cmd')

unless no_java_cmd
javacmd, javacmd_options = Utilities.find_graal_javacmd_and_options
jruby_opts.push *javacmd_options
@@ -856,6 +857,10 @@ def test_ecosystem(env={}, *args)

env_vars["JRUBY_OPTS"] = jruby_opts.join(' ')

unless File.exist? "#{JRUBY_DIR}/../jruby-truffle-gem-test-pack/gem-testing"
raise 'missing ../jruby-truffle-gem-test-pack/gem-testing directory'
end

env_vars["PATH"] = "#{Utilities.find_jruby_bin_dir}:#{ENV["PATH"]}"
tests_path = "#{JRUBY_DIR}/test/truffle/ecosystem"
single_test = !args.empty?
@@ -1126,7 +1131,7 @@ def benchmark(*args)
a
end
end

run_args = []
run_args.push '--graal' unless args.delete('--no-graal') || args.include?('list')
run_args.push '-J-G:+TruffleCompilationExceptionsAreFatal'
@@ -1136,7 +1141,7 @@ def benchmark(*args)
run_args.push *args
run *run_args
end

def where(*args)
case args.shift
when 'repos'