From 1fac7b79f3f524afcd9723bfb0fd72fc5ac53bdf Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Sat, 27 Sep 2014 16:37:44 +0200 Subject: [PATCH] Follow up to #16613 Since we want this flag to be enabled anytime we are running the tests under JRuby, let's enable this at the Rakefile level so people get the performance boost on their local checkout. Moreover, we avoid having to update this particular line anytime the option changes on the JRuby side. The only drawback is that we have to define it in every Rakefile but there's no big deal, this is already the case for other options. --- .travis.yml | 2 +- actionmailer/Rakefile | 1 + actionpack/Rakefile | 1 + actionview/Rakefile | 3 +++ activejob/Rakefile | 2 ++ activemodel/Rakefile | 1 + activerecord/Rakefile | 1 + activesupport/Rakefile | 2 +- railties/Rakefile | 1 + 9 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c213700687..520c434f06 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ rvm: - jruby env: global: - - JRUBY_OPTS='-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Djruby.compile.mode=OFF -J-Djruby.compile.invokedynamic=false -J-Xmx1024M' + - JRUBY_OPTS='-J-Xmx1024M' matrix: - "GEM=railties" - "GEM=ap" diff --git a/actionmailer/Rakefile b/actionmailer/Rakefile index 5ddd90020b..8f4de8fafa 100644 --- a/actionmailer/Rakefile +++ b/actionmailer/Rakefile @@ -10,6 +10,7 @@ Rake::TestTask.new { |t| t.pattern = 'test/**/*_test.rb' t.warning = true t.verbose = true + t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION) } namespace :test do diff --git a/actionpack/Rakefile b/actionpack/Rakefile index af075f82ad..4b60b77759 100644 --- a/actionpack/Rakefile +++ b/actionpack/Rakefile @@ -16,6 +16,7 @@ Rake::TestTask.new do |t| t.warning = true t.verbose = true + t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION) end namespace :test do diff --git a/actionview/Rakefile b/actionview/Rakefile index d56fe9ea76..1b71435948 100644 --- a/actionview/Rakefile +++ b/actionview/Rakefile @@ -21,6 +21,7 @@ namespace :test do t.test_files = Dir.glob('test/template/**/*_test.rb').sort t.warning = true t.verbose = true + t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION) end namespace :integration do @@ -30,6 +31,7 @@ namespace :test do t.test_files = Dir.glob("test/activerecord/*_test.rb") t.warning = true t.verbose = true + t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION) end desc 'ActionPack Integration Tests' @@ -38,6 +40,7 @@ namespace :test do t.test_files = Dir.glob("test/actionpack/**/*_test.rb") t.warning = true t.verbose = true + t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION) end end end diff --git a/activejob/Rakefile b/activejob/Rakefile index dadd0baf82..a66df8939e 100644 --- a/activejob/Rakefile +++ b/activejob/Rakefile @@ -35,6 +35,7 @@ namespace :test do t.libs << 'test' t.test_files = FileList['test/cases/**/*_test.rb'] t.verbose = true + t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION) end namespace :isolated do @@ -52,6 +53,7 @@ namespace :test do t.libs << 'test' t.test_files = FileList['test/integration/**/*_test.rb'] t.verbose = true + t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION) end end end diff --git a/activemodel/Rakefile b/activemodel/Rakefile index 407dda2ec3..c30a559ef5 100644 --- a/activemodel/Rakefile +++ b/activemodel/Rakefile @@ -9,6 +9,7 @@ Rake::TestTask.new do |t| t.test_files = Dir.glob("#{dir}/test/cases/**/*_test.rb").sort t.warning = true t.verbose = true + t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION) end namespace :test do diff --git a/activerecord/Rakefile b/activerecord/Rakefile index b1069e5dcc..976b559da9 100644 --- a/activerecord/Rakefile +++ b/activerecord/Rakefile @@ -55,6 +55,7 @@ end t.warning = true t.verbose = true + t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION) } namespace :isolated do diff --git a/activesupport/Rakefile b/activesupport/Rakefile index 5ba153662a..7c40df8dc8 100644 --- a/activesupport/Rakefile +++ b/activesupport/Rakefile @@ -7,9 +7,9 @@ Rake::TestTask.new do |t| t.pattern = 'test/**/*_test.rb' t.warning = true t.verbose = true + t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION) end - namespace :test do task :isolated do Dir.glob("test/**/*_test.rb").all? do |file| diff --git a/railties/Rakefile b/railties/Rakefile index a899d069b5..9a377ce4ee 100644 --- a/railties/Rakefile +++ b/railties/Rakefile @@ -29,6 +29,7 @@ Rake::TestTask.new('test:regular') do |t| t.pattern = 'test/**/*_test.rb' t.warning = true t.verbose = true + t.ruby_opts = ["--dev"] if defined?(JRUBY_VERSION) end # Generate GEM ----------------------------------------------------------------------------