Project

General

Profile

Actions

Bug #3452

closed

ENV 'make' is not considered in the rubygems test.

Added by tarui (Masaya Tarui) over 14 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.2dev
Backport:
[ruby-core:30820]

Description

=begin
Hi, Eric

the test fails follows.

$make=which make ruby test/rubygems/test_gem_ext_configure_builder.rb

  1. Failure:
    test_self_build(TestGemExtConfigureBuilder) [test/rubygems/test_gem_ext_configure_builder.rb:33]:
    Expected "make", not "/usr/bin/make".
  2. Failure:
    test_self_build_has_makefile(TestGemExtConfigureBuilder) [test/rubygems/test_gem_ext_configure_builder.rb:79]:
    Expected "make", not "/usr/bin/make".

on Windows,

nmake install test-all
also fails.
because defined MAKE by 'install' target, and environment's variable name is not case-sensitive on Windows.

I have some questions.

  1. Is it intentional to use not ENV['MAKE'] but ENV['make'] at rubygems/ext/builder.rb ?

  2. What do you want to test by test_self_build, test_self_build_has_makefile, test_class_build and test_clas_make?
    Is it necessary to check make command?
    If you think that, you should do unsetenv or check ENV.

I think that the redefine of MAKE at 'make install' is wrong, but it is another problem.
=end


Related issues 1 (0 open1 closed)

Has duplicate Ruby master - Bug #3430: ENV 'MAKE' is not considered in the gem test.Closed06/12/2010Actions
Actions #1

Updated by tarui (Masaya Tarui) over 14 years ago

  • Status changed from Open to Closed

=begin
ruby-core向けでチケットを作り直したので、こちらは閉じます。

=end

Actions #2

Updated by tarui (Masaya Tarui) over 14 years ago

  • Status changed from Closed to Assigned

=begin

=end

Actions #3

Updated by mame (Yusuke Endoh) over 14 years ago

  • Category set to lib
  • Assignee changed from drbrain (Eric Hodel) to tarui (Masaya Tarui)

=begin
Hi,

How about this patch?
If it works, please commit it.
If not, please fix and commit it :-)

diff --git a/test/rubygems/gemutilities.rb b/test/rubygems/gemutilities.rb
index f1b0f75..803cd26 100644
--- a/test/rubygems/gemutilities.rb
+++ b/test/rubygems/gemutilities.rb
@@ -474,7 +474,7 @@ Also, a list:
# other platforms, including Cygwin, it will return 'make'.
#
def self.make_command

  • vc_windows? ? 'nmake' : 'make'
  • ENV["make"] || (vc_windows? ? 'nmake' : 'make')
    end
# Returns the make command for the current platform. For versions of Ruby

@@ -482,7 +482,7 @@ Also, a list:
# other platforms, including Cygwin, it will return 'make'.
#
def make_command

  • vc_windows? ? 'nmake' : 'make'
  • ENV["make"] || (vc_windows? ? 'nmake' : 'make')
    end
# Returns whether or not the nmake command could be found.

diff --git a/test/rubygems/test_gem_ext_configure_builder.rb b/test/rubygems/test_gem_ext_configure_builder.rb
index 451aa4c..c484203 100644
--- a/test/rubygems/test_gem_ext_configure_builder.rb
+++ b/test/rubygems/test_gem_ext_configure_builder.rb
@@ -30,9 +30,9 @@ class TestGemExtConfigureBuilder < RubyGemTestCase

  assert_equal "sh ./configure --prefix=#{@dest_path}", output.shift
  assert_equal "", output.shift
  • assert_equal "make", output.shift
  • assert_equal make_command, output.shift
    assert_match(/^ok$/m, output.shift)
  • assert_equal "make install", output.shift
  • assert_equal make_command + " install", output.shift
    assert_match(/^ok$/m, output.shift)
    end

diff --git a/test/rubygems/test_gem_ext_ext_conf_builder.rb b/test/rubygems/test_gem_ext_ext_conf_builder.rb
index 84af073..d9483df 100644
--- a/test/rubygems/test_gem_ext_ext_conf_builder.rb
+++ b/test/rubygems/test_gem_ext_ext_conf_builder.rb
@@ -39,14 +39,8 @@ class TestGemExtExtConfBuilder < RubyGemTestCase

  assert_match(/^#{Gem.ruby} extconf.rb/, output[0])
  assert_equal "creating Makefile\n", output[1]
  • case RUBY_PLATFORM
  • when /mswin/ then
  •  assert_equal "nmake", output[2]
    
  •  assert_equal "nmake install", output[4]
    
  • else
  •  assert_equal "make", output[2]
    
  •  assert_equal "make install", output[4]
    
  • end
  • assert_equal make_command, output[2]
  • assert_equal make_command + " install", output[4]
    end
def test_class_build_extconf_fail

--
Yusuke Endoh
=end

Actions #4

Updated by tarui (Masaya Tarui) over 14 years ago

  • Status changed from Assigned to Closed

=begin
I committed the fix as r28461.

By the way, does no one worry about the following doubt?

  1. Is it intentional to use not ENV['MAKE'] but ENV['make'] at rubygems/ext/builder.rb ?

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0