Issue #8058 has been updated by h.shirosaki (Hiroshi Shirosaki).


=begin
This test seems require installed ruby due to the following make rule on Windows.

 $(DEFFILE): 
 	$(ECHO) generating $(@)
 	$(Q) $(RUBY) -e "puts 'EXPORTS', '$(TARGET_ENTRY)'"  > $@

But ruby is not installed before test-all on CI. So $(RUBY) does not exist and the test fails.

Here is a possible fix.


 diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb
 index 0f9bfef..89a1a4a 100644
 --- a/test/rubygems/test_gem_installer.rb
 +++ b/test/rubygems/test_gem_installer.rb
 @@ -1073,6 +1073,7 @@ gem 'other', version
  
          CONFIG['CC'] = '$(TOUCH) $@ ||'
          CONFIG['LDSHARED'] = '$(TOUCH) $@ ||'
 +        $ruby = '$(TOUCH) $@ ||'
  
          create_makefile("#{@spec.name}")
        RUBY
=end

----------------------------------------
Bug #8058: RubyGems test failures under MinGW
https://bugs.ruby-lang.org/issues/8058#change-37662

Author: luislavena (Luis Lavena)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: lib
Target version: current: 2.1.0
ruby -v: ruby 2.1.0dev (2013-03-09 trunk 39650) [i386-mingw32]


=begin

Hello,

Seems some of the tests for RubyGems are failing on RubyInstaller CI:

http://ci.rubyinstaller.org/job/ruby-trunk-x64-test-all/846/console
http://ci.rubyinstaller.org/job/ruby-trunk-x86-test-all/969/console

   1) Error:
 test_install_extension_flat(TestGemInstaller):
 Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
 
     C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/build/ruby.exe extconf.rb
 creating Makefile
 
 make
 make[1]: Entering directory `/tmp/test_rubygems_11492/gemhome/gems/a-2'
 generating a-x64-mingw32.def
 /bin/sh: /usr/local/bin/ruby: No such file or directory
 make[1]: *** [a-x64-mingw32.def] Error 127
 make[1]: Leaving directory `/tmp/test_rubygems_11492/gemhome/gems/a-2'
 
 
 Gem files will remain installed in C:/Users/Worker/AppData/Local/Temp/test_rubygems_11492/gemhome/gems/a-2 for inspection.
 Results logged to C:/Users/Worker/AppData/Local/Temp/test_rubygems_11492/gemhome/gems/a-2/./gem_make.out
 
     C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/rubygems/ext/builder.rb:55:in `run'
     C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/rubygems/ext/builder.rb:28:in `block in make'
     C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/rubygems/ext/builder.rb:26:in `each'
     C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/rubygems/ext/builder.rb:26:in `make'
     C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/rubygems/ext/ext_conf_builder.rb:39:in `block in build'
     C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/tempfile.rb:324:in `open'
     C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/rubygems/ext/ext_conf_builder.rb:18:in `build'
     C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/rubygems/installer.rb:678:in `block (2 levels) in build_extensions'
     C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/rubygems/installer.rb:677:in `chdir'
     C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/rubygems/installer.rb:677:in `block in build_extensions'
     C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/rubygems/installer.rb:652:in `each'
     C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/rubygems/installer.rb:652:in `build_extensions'
     C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/rubygems/installer.rb:218:in `install'
     C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/test/rubygems/test_gem_installer.rb:1092:in `block in test_install_extension_flat'
     C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/rubygems/user_interaction.rb:40:in `use_ui'
     C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/lib/rubygems/user_interaction.rb:63:in `use_ui'
     C:/Users/Worker/Jenkins/workspace/ruby-trunk-x64-build/test/rubygems/test_gem_installer.rb:1088:in `test_install_extension_flat'

Seems this could be caused via a change on what (({ruby})) is form RbConfig perhaps?

I'm opening this for discussion.

Thank you.

=end


-- 
http://bugs.ruby-lang.org/