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

Commits on Oct 30, 2014

  1. Copy the full SHA
    6b59b8d View commit details
  2. Bump test-unit to 3.0.3.

    headius committed Oct 30, 2014
    Copy the full SHA
    2339009 View commit details
  3. Tweaks and twiddles to get 2.2 test suite running.

    Still needs to have excludes added, but it runs now.
    headius committed Oct 30, 2014
    Copy the full SHA
    ea812df View commit details
  4. Copy the full SHA
    8d19cfa View commit details
36 changes: 28 additions & 8 deletions lib/pom.rb
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ def version
ImportedGem.new( 'ffi', '1.9.3', true ),
ImportedGem.new( 'jar-dependencies', '0.1.2', true ),
ImportedGem.new( 'minitest', '5.4.1', true ),
ImportedGem.new( 'test-unit', '3.0.1', true ),
ImportedGem.new( 'test-unit', '3.0.3', true ),
ImportedGem.new( 'power_assert', '0.1.4', true )
]

@@ -157,21 +157,34 @@ def to_pathname
puts
puts "--- gem #{g.name}-#{version} ---"

# copy the gem content to shared or to respective
# copy the gem content to stdlib
stdlib_dir = File.join( ruby_dir, 'stdlib' )
puts "copy gem content to #{stdlib_dir}"
# assume default require_path
require_base = File.join( gems, "#{g.name}-#{version}*", 'lib' )
require_files = File.join( require_base, '*' )

# remove old ones first
# copy in new ones and mark writable for future updates (e.g. minitest)
stdlib_locs = []
Dir[ require_files ].each do |f|
FileUtils.rm_rf( f.sub( require_base, stdlib_dir ) )
puts "copying: #{f} to #{stdlib_dir}"
FileUtils.cp_r( f, stdlib_dir )

stdlib_loc = f.sub( File.dirname(f), stdlib_dir )
if File.directory?(stdlib_loc)
stdlib_locs += Dir[stdlib_loc + "/*"].to_a
else
stdlib_locs << stdlib_loc
end
end

# copy in new ones
Dir[ require_files ].each do |f|
FileUtils.cp_r( f, stdlib_dir )
# fix permissions on copied files
stdlib_locs.each do |f|
next if File.writable? f

puts "fixing permissions: #{f}"
# TODO: better way to just set it writable without changing all modes?
FileUtils.chmod_R(0644, f)
end

# copy bin files if the gem has any
@@ -186,7 +199,14 @@ def to_pathname
end

if g.default_gem
specname = File.basename( Dir[ File.join( specs, "#{g.name}-#{version}*.gemspec" ) ].first )
specfile_wildcard = "#{g.name}-#{version}*.gemspec"
specfile = Dir[ File.join( specs, specfile_wildcard ) ].first

unless specfile
raise Errno::ENOENT, "gemspec #{specfile_wildcard} not found; dependency unspecified in lib/pom.xml?"
end

specname = File.basename( specfile )
puts "copy to specifications/default: #{specname}"

spec = Gem::Package.new( Dir[ File.join( cache, "#{g.name}-#{version}*.gem" ) ].first ).spec
2 changes: 1 addition & 1 deletion lib/pom.xml
Original file line number Diff line number Diff line change
@@ -104,7 +104,7 @@
<dependency>
<groupId>rubygems</groupId>
<artifactId>test-unit</artifactId>
<version>3.0.1</version>
<version>3.0.3</version>
<type>gem</type>
</dependency>
<dependency>
36 changes: 16 additions & 20 deletions rakelib/test.rake
Original file line number Diff line number Diff line change
@@ -51,28 +51,24 @@ namespace :test do
:aot => ["-X+C", "-J-XX:MaxPermSize=256M"],
:all => [:int, :jit, :aot]
}

permute_tests(:mri, compile_flags) do |t|
files = []
File.open('test/mri.index') do |f|
f.each_line.each do |line|
filename = "test/#{line.chomp}.rb"
next unless File.exist? filename
files << filename
end

namespace :mri do
mri_test_files = File.readlines('test/mri.index').grep(/^[^#]\w+/).map(&:chomp).join(' ')
task :int do
ruby "-X-C -r ./test/mri_test_env.rb test/mri/runner.rb -q -- #{mri_test_files}"
end
t.test_files = files
t.verbose = true
ENV['EXCLUDE_DIR'] = 'test/mri/excludes'
ENV['TESTOPT'] = '--tty=no'
t.ruby_opts << '-J-ea'
t.ruby_opts << '-I lib/ruby/stdlib'
t.ruby_opts << '-I .'
t.ruby_opts << '-I test/mri'
t.ruby_opts << '-I test/mri/ruby'
t.ruby_opts << '-r ./test/mri_test_env.rb'
t.ruby_opts << '-r minitest/excludes'

task :jit do
ruby "-Xjit.threshold=0 -Xjit.background=false -r ./test/mri_test_env.rb test/mri/runner.rb -q -- #{mri_test_files}"
end

task :aot do
ruby "-X+C -Xjit.background=false -r ./test/mri_test_env.rb test/mri/runner.rb -q -- #{mri_test_files}"
end

task all: %s[int jit aot]
end
task mri: 'test:mri:int'

permute_tests(:jruby, compile_flags, 'test:compile') do |t|
files = []
File renamed without changes.
Loading