diff options
| author | Yuta Saito <kateinoigakukun@gmail.com> | 2024-05-15 07:58:41 +0000 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-06-18 00:59:36 +0000 |
| commit | 97a23db5acc87c3a44bd005aef00c8003f45adb4 (patch) | |
| tree | 71d1497f6bca7e9f87e17eb9437413aaec647605 /test | |
| parent | 3e4b694565f8459c95283f6ec6aed52ad38cc57a (diff) | |
[rubygems/rubygems] Disable `install_extension_in_lib` when cross-compiling
https://github.com/rubygems/rubygems/commit/643e154f32
Diffstat (limited to 'test')
| -rw-r--r-- | test/rubygems/test_gem_ext_builder.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_ext_builder.rb b/test/rubygems/test_gem_ext_builder.rb index 9907ec5f21..d84091d00c 100644 --- a/test/rubygems/test_gem_ext_builder.rb +++ b/test/rubygems/test_gem_ext_builder.rb @@ -330,6 +330,7 @@ install: end f.puts "RbConfig::CONFIG['host_os'] = 'fake_os'" f.puts "RbConfig::CONFIG['arch'] = 'fake_arch'" + f.puts "RbConfig::CONFIG['platform'] = 'fake_platform'" end system(Gem.ruby, "-rmkmf", "-e", "exit MakeMakefile::RbConfig::CONFIG['host_os'] == 'fake_os'", @@ -340,6 +341,9 @@ install: @builder = Gem::Ext::Builder.new @spec, "", Gem::TargetRbConfig.from_path(fake_rbconfig) FileUtils.mkdir_p @spec.gem_dir + lib_dir = File.join(@spec.gem_dir, "lib") + + FileUtils.mkdir lib_dir File.open File.join(@spec.gem_dir, "extconf.rb"), "w" do |f| f.write <<-'RUBY' @@ -367,6 +371,7 @@ install: arch=fake_arch DUMP assert_path_exist @spec.extension_dir + assert_equal [], Dir.glob(File.join(lib_dir, "*")) end def test_initialize |
