mirror of
https://github.com/ruby/ruby.git
synced 2025-09-23 20:44:00 +02:00
[rubygems/rubygems] Added begin-end block for java platform
Because pend of test-unit raises exception.
b5e2d0855a
This commit is contained in:
parent
b314885af0
commit
bef49e6e8d
Notes:
git
2021-05-12 17:25:15 +09:00
1 changed files with 37 additions and 35 deletions
|
@ -1525,50 +1525,52 @@ gem 'other', version
|
||||||
def test_install_extension_flat
|
def test_install_extension_flat
|
||||||
skip "extensions don't quite work on jruby" if Gem.java_platform?
|
skip "extensions don't quite work on jruby" if Gem.java_platform?
|
||||||
|
|
||||||
@spec = setup_base_spec
|
begin
|
||||||
@spec.require_paths = ["."]
|
@spec = setup_base_spec
|
||||||
|
@spec.require_paths = ["."]
|
||||||
|
|
||||||
@spec.extensions << "extconf.rb"
|
@spec.extensions << "extconf.rb"
|
||||||
|
|
||||||
write_file File.join(@tempdir, "extconf.rb") do |io|
|
write_file File.join(@tempdir, "extconf.rb") do |io|
|
||||||
io.write <<-RUBY
|
io.write <<-RUBY
|
||||||
require "mkmf"
|
require "mkmf"
|
||||||
|
|
||||||
CONFIG['CC'] = '$(TOUCH) $@ ||'
|
CONFIG['CC'] = '$(TOUCH) $@ ||'
|
||||||
CONFIG['LDSHARED'] = '$(TOUCH) $@ ||'
|
CONFIG['LDSHARED'] = '$(TOUCH) $@ ||'
|
||||||
$ruby = '#{Gem.ruby}'
|
$ruby = '#{Gem.ruby}'
|
||||||
|
|
||||||
create_makefile("#{@spec.name}")
|
create_makefile("#{@spec.name}")
|
||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
|
|
||||||
# empty depend file for no auto dependencies
|
# empty depend file for no auto dependencies
|
||||||
@spec.files += %W[depend #{@spec.name}.c].each do |file|
|
@spec.files += %W[depend #{@spec.name}.c].each do |file|
|
||||||
write_file File.join(@tempdir, file)
|
write_file File.join(@tempdir, file)
|
||||||
end
|
end
|
||||||
|
|
||||||
so = File.join(@spec.gem_dir, "#{@spec.name}.#{RbConfig::CONFIG["DLEXT"]}")
|
so = File.join(@spec.gem_dir, "#{@spec.name}.#{RbConfig::CONFIG["DLEXT"]}")
|
||||||
assert_path_not_exist so
|
assert_path_not_exist so
|
||||||
use_ui @ui do
|
use_ui @ui do
|
||||||
path = Gem::Package.build @spec
|
path = Gem::Package.build @spec
|
||||||
|
|
||||||
installer = Gem::Installer.at path
|
installer = Gem::Installer.at path
|
||||||
installer.install
|
installer.install
|
||||||
end
|
end
|
||||||
assert_path_exist so
|
assert_path_exist so
|
||||||
rescue
|
rescue
|
||||||
puts '-' * 78
|
puts '-' * 78
|
||||||
puts File.read File.join(@gemhome, 'gems', 'a-2', 'Makefile')
|
puts File.read File.join(@gemhome, 'gems', 'a-2', 'Makefile')
|
||||||
puts '-' * 78
|
|
||||||
|
|
||||||
path = File.join(@gemhome, 'gems', 'a-2', 'gem_make.out')
|
|
||||||
|
|
||||||
if File.exist?(path)
|
|
||||||
puts File.read(path)
|
|
||||||
puts '-' * 78
|
puts '-' * 78
|
||||||
end
|
|
||||||
|
|
||||||
raise
|
path = File.join(@gemhome, 'gems', 'a-2', 'gem_make.out')
|
||||||
|
|
||||||
|
if File.exist?(path)
|
||||||
|
puts File.read(path)
|
||||||
|
puts '-' * 78
|
||||||
|
end
|
||||||
|
|
||||||
|
raise
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_installation_satisfies_dependency_eh
|
def test_installation_satisfies_dependency_eh
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue