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: f0aaf44835b2
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0167f3fd711c
Choose a head ref
  • 3 commits
  • 6 files changed
  • 2 contributors

Commits on Dec 2, 2014

  1. Add a spec:ruby:fast target that avoids subprocess-spawning specs.

    Conflicts:
    	rakelib/rubyspec.rake
    headius committed Dec 2, 2014
    Copy the full SHA
    179811e View commit details
  2. Update list of slow language specs.

    eregon authored and headius committed Dec 2, 2014
    Copy the full SHA
    74f8381 View commit details
  3. Copy the full SHA
    0167f3f View commit details
Showing with 71 additions and 20 deletions.
  1. +2 −2 .travis.yml
  2. +6 −3 antlib/spec.xml
  3. +2 −1 rakelib/commands.rake
  4. +18 −14 rakelib/rubyspec.rake
  5. +22 −0 spec/jruby.1.8.mspec
  6. +21 −0 spec/jruby.1.9.mspec
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -14,8 +14,8 @@ env:
- JAVA_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Djruby.cext.enabled=false"
matrix:
- TARGET='test-extended'
- TARGET='spec:ci_interpreted_via_env' RUBYSPEC_LANG_VER='1.8'
- TARGET='spec:ci_interpreted_via_env' RUBYSPEC_LANG_VER='1.9'
- TARGET='spec:ruby:fast'
- TARGET='spec:ruby19:fast'
- TARGET='jruby-jars'
- TARGET='complete'
- TARGET='main'
9 changes: 6 additions & 3 deletions antlib/spec.xml
Original file line number Diff line number Diff line change
@@ -34,8 +34,11 @@
<target name="spec:ci_interpreted_19" depends="bootstrap">
<rake task="spec:ci_interpreted_19"/>
</target>
<target name="spec:ci_interpreted_via_env" depends="bootstrap">
<rake task="spec:ci_interpreted_via_env"/>
<target name="spec:ruby:fast" depends="bootstrap">
<rake task="spec:ruby:fast"/>
</target>
<target name="spec:ruby19:fast" depends="bootstrap">
<rake task="spec:ruby19:fast"/>
</target>
<target name="spec:ci_compiled_18" depends="bootstrap">
<rake task="spec:ci_compiled_18"/>
@@ -144,4 +147,4 @@
</sequential>
</macrodef>

</project>
</project>
3 changes: 2 additions & 1 deletion rakelib/commands.rake
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ def mspec(mspec_options = {}, java_options = {}, &code)
sysproperty :key => "emma.verbosity.level", :value=> "silent"

env :key => "JAVA_OPTS", :value => "-Demma.verbosity.level=silent"
env :key => "JRUBY_OPTS", :value => ""
env :key => "JRUBY_OPTS", :value => ms[:jruby_opts] || ""
# launch in the same mode we're testing, since config is loaded by top process
arg :line => "--#{ms[:compat]}"

@@ -114,6 +114,7 @@ def mspec(mspec_options = {}, java_options = {}, &code)
arg :line => "-T -J-XX:MaxPermSize=512M" if ENV_JAVA["java.version"] !~ /\A1\.8/
arg :line => "-f #{ms[:format]}"
arg :line => "-B #{ms[:spec_config]}" if ms[:spec_config]
arg :line => "#{ms[:spec_target]}" if ms[:spec_target]
end
end

32 changes: 18 additions & 14 deletions rakelib/rubyspec.rake
Original file line number Diff line number Diff line change
@@ -53,6 +53,24 @@ namespace :spec do
desc "Run rubyspecs expected to pass (against latest rubyspec version)"
task :ci_latest => ['spec:fast_forward_to_rubyspec_head', 'spec:tagged_18']

desc "Run fast 1.8 specs that do not spawn many subprocesses"
task :'ruby:fast' do
mspec :compile_mode => "OFF",
:format => 's',
:spec_target => ":fast",
:jruby_opts => "--dev",
:compat => "1.8"
end

desc "Run fast 1.9 specs that do not spawn many subprocesses"
task :'ruby19:fast' do
mspec :compile_mode => "OFF",
:format => 's',
:spec_target => ":fast",
:jruby_opts => "--dev",
:compat => "1.9"
end

desc "Run rubyspecs expected to pass (against latest rubyspec version)"
task :ci_latest_19 => ['spec:fast_forward_to_rubyspec_head', 'spec:tagged_19']

@@ -167,20 +185,6 @@ namespace :spec do
task :all_compiled_19 do
mspec :compile_mode => "JIT", :jit_threshold => 0, :compat => "1.9", :format => 'd'
end

# Parameterized rubyspec runs for e.g. TravisCI
desc "Run RubySpec in interpreted mode under the language compat version ENV['RUBYSPEC_LANG_VER']"
task :ci_interpreted_via_env do
ENV['RUBYSPEC_LANG_VER'] ||= '1.9'
case
when ENV['RUBYSPEC_LANG_VER'] == '1.8'
spec_config_file = RUBY18_MSPEC_FILE
else
spec_config_file = RUBY19_MSPEC_FILE
end
mspec :compile_mode => 'OFF', :compat => ENV['RUBYSPEC_LANG_VER'],
:spec_config => spec_config_file, :format => 's'
end

# Complimentary tasks for running specs

22 changes: 22 additions & 0 deletions spec/jruby.1.8.mspec
Original file line number Diff line number Diff line change
@@ -27,6 +27,28 @@ class MSpecScript
'^' + SPEC_DIR + '/core/basicobject'
]

set :fast,
get(:language) +
get(:core) +

[
# These all spawn sub-rubies, making them very slow to run
'^' + SPEC_DIR + '/core/process',
'^' + SPEC_DIR + '/core/kernel/exec',
'^' + SPEC_DIR + '/core/kernel/spawn',
'^' + SPEC_DIR + '/core/io/popen',
'^' + SPEC_DIR + '/core/argf/gets_spec.rb',
'^' + SPEC_DIR + '/core/argf/read_spec.rb',
'^' + SPEC_DIR + '/core/argf/readline_spec.rb',
'^' + SPEC_DIR + '/core/encoding/default_external_spec.rb',
'^' + SPEC_DIR + '/core/encoding/default_internal_spec.rb',
'^' + SPEC_DIR + '/core/io/pid_spec.rb',
'^' + SPEC_DIR + '/core/kernel/at_exit_spec.rb',
'^' + SPEC_DIR + '/language/break_spec.rb',
'^' + SPEC_DIR + '/language/predefined_spec.rb',
'^' + SPEC_DIR + '/language/predefined/data_spec.rb',
]

# Filter out ObjectSpace specs if ObjectSpace is disabled
unless JRuby.objectspace
get(:core) << '^' + SPEC_DIR + '/core/objectspace/_id2ref'
21 changes: 21 additions & 0 deletions spec/jruby.1.9.mspec
Original file line number Diff line number Diff line change
@@ -29,6 +29,27 @@ class MSpecScript
'^' + SPEC_DIR + '/core/encoding/converter'
]

set :fast, [
*get(:language),
*get(:core),

# These all spawn sub-rubies, making them very slow to run
'^' + SPEC_DIR + '/core/process',
'^' + SPEC_DIR + '/core/kernel/exec',
'^' + SPEC_DIR + '/core/kernel/spawn',
'^' + SPEC_DIR + '/core/io/popen',
'^' + SPEC_DIR + '/core/argf/gets_spec.rb',
'^' + SPEC_DIR + '/core/argf/read_spec.rb',
'^' + SPEC_DIR + '/core/argf/readline_spec.rb',
'^' + SPEC_DIR + '/core/encoding/default_external_spec.rb',
'^' + SPEC_DIR + '/core/encoding/default_internal_spec.rb',
'^' + SPEC_DIR + '/core/io/pid_spec.rb',
'^' + SPEC_DIR + '/core/kernel/at_exit_spec.rb',
'^' + SPEC_DIR + '/language/break_spec.rb',
'^' + SPEC_DIR + '/language/predefined_spec.rb',
'^' + SPEC_DIR + '/language/predefined/data_spec.rb',
]

# Filter out ObjectSpace specs if ObjectSpace is disabled
unless JRuby.objectspace
get(:core) << '^' + SPEC_DIR + '/core/objectspace/_id2ref'