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

Commits on May 20, 2015

  1. 2
    Copy the full SHA
    5aae3eb View commit details
  2. Copy the full SHA
    e0916d1 View commit details
  3. Copy the full SHA
    964ca3a View commit details
1 change: 1 addition & 0 deletions spec/tags/ruby/core/argf/gets_tags.txt
Original file line number Diff line number Diff line change
@@ -4,3 +4,4 @@ fails:ARGF.gets reads all lines of two files
fails:ARGF.gets sets $_ global variable with each line read
fails:ARGF.gets returns nil when reaching end of files
fails:ARGF.gets reads the contents of the file with default encoding
slow:ARGF.gets reads all lines of stdin
3 changes: 3 additions & 0 deletions spec/tags/ruby/core/argf/read_tags.txt
Original file line number Diff line number Diff line change
@@ -10,3 +10,6 @@ fails:ARGF.read reads across two files consecutively
fails:ARGF.read reads the contents of the same file twice
fails:ARGF.read reads the contents of a special device file
fails:ARGF.read reads the contents of the file with default encoding
slow:ARGF.read reads the contents of stdin
slow:ARGF.read reads a number of bytes from stdin
slow:ARGF.read reads the contents of one file and stdin
1 change: 1 addition & 0 deletions spec/tags/ruby/core/argf/readlines_tags.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
fails:ARGF.readlines reads all lines of all files
fails:ARGF.readlines returns an empty Array when end of stream reached
slow:ARGF.readline reads all lines of stdin
1 change: 1 addition & 0 deletions spec/truffle/tags/core/argf/gets_tags.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
fails:ARGF.gets sets $_ global variable with each line read
fails:ARGF.gets modifies the files when in place edit mode is on
fails:ARGF.gets modifies and backups two files when in place edit mode is on
slow:ARGF.gets reads all lines of stdin
3 changes: 3 additions & 0 deletions spec/truffle/tags/core/argf/read_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
slow:ARGF.read reads the contents of stdin
slow:ARGF.read reads a number of bytes from stdin
slow:ARGF.read reads the contents of one file and stdin
1 change: 1 addition & 0 deletions spec/truffle/tags/core/argf/readline_tags.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
fails:ARGF.readline sets $_ global variable with each line read
fails:ARGF.readline modifies the files when in place edit mode is on
fails:ARGF.readline modifies and backups two files when in place edit mode is on
slow:ARGF.readline reads all lines of stdin
1 change: 1 addition & 0 deletions spec/truffle/tags/truffle/primitive/gc_count_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
slow:Truffle::Primitive.gc_count increases as collections are run
1 change: 1 addition & 0 deletions spec/truffle/tags/truffle/primitive/gc_time_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
slow:Truffle::Primitive.gc_time increases as collections are run
29 changes: 29 additions & 0 deletions spec/truffle/truffle.mspec
Original file line number Diff line number Diff line change
@@ -179,5 +179,34 @@ class MSpecScript
MSpec.enable_feature :generator

set :files, get(:language) + get(:core) + get(:library) + get(:truffle)
end

if respond_to?(:ruby_exe)
class SlowSpecsTagger
def initialize
MSpec.register :exception, self
end

def exception(state)
if state.exception.is_a? SlowSpecException
tag = SpecTag.new("slow:#{state.describe} #{state.it}")
MSpec.write_tag(tag)
end
end
end

class SlowSpecException < Exception
end

class ::Object
alias old_ruby_exe ruby_exe
def ruby_exe(*args, &block)
if (MSpecScript.get(:xtags) || []).include? 'slow'
raise SlowSpecException, "Was tagged as slow as it uses ruby_exe(). Rerun specs."
end
old_ruby_exe(*args, &block)
end
end

SlowSpecsTagger.new
end
16 changes: 8 additions & 8 deletions tool/jt.rb
Original file line number Diff line number Diff line change
@@ -271,18 +271,18 @@ def test(*args)
return test_pe(*args.drop(1)) if args.first == 'pe'
return test_mri(*args.drop(1)) if args.first == 'mri'
return test_specs(*args.drop(1)) if args.first == 'specs'
return test_specs(*args) if args.first == 'fast'

if args.size > 0
if args.first.start_with?('spec')
return test_specs(*args)
if args.empty?
test_specs(*args)
test_mri(*args)
else
path = args.first
if File.expand_path(path).start_with?("#{JRUBY_DIR}/test")
test_mri(*args)
else
return test_mri(*args)
test_specs(*args)
end
end

test_specs(*args)
test_mri(*args)
end

def test_pe(*args)