diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-25 17:55:32 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-25 17:55:32 +0000 |
commit | fb82ba2f1c706c4e4a7ab9e359d084704d745f1a (patch) | |
tree | 0736496bc5f6abf1b76b1104680ad2f0cbe01745 /test | |
parent | 9f110100be6555e5a8f33171a53602a201af9a83 (diff) |
merge revision(s) 41629: [Backport #8533]
* lib/rubygems/ext/builder.rb (Gem::Ext::Builder.make): Pass
DESTDIR via command line to override what's in MAKEFLAGS. This
fixes an installation problem under a package building
environment where DESTDIR is specified in the (parent) command
line. [Fixes GH-327]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/rubygems/test_gem_ext_cmake_builder.rb | 8 | ||||
-rw-r--r-- | test/rubygems/test_gem_ext_configure_builder.rb | 8 | ||||
-rw-r--r-- | test/rubygems/test_gem_ext_ext_conf_builder.rb | 20 |
3 files changed, 15 insertions, 21 deletions
diff --git a/test/rubygems/test_gem_ext_cmake_builder.rb b/test/rubygems/test_gem_ext_cmake_builder.rb index 0e4f8fe0ff..24960144d7 100644 --- a/test/rubygems/test_gem_ext_cmake_builder.rb +++ b/test/rubygems/test_gem_ext_cmake_builder.rb @@ -38,8 +38,8 @@ install (FILES test.txt DESTINATION bin) assert_match \ %r%^cmake \. -DCMAKE_INSTALL_PREFIX=#{Regexp.escape @dest_path}%, output assert_match %r%#{Regexp.escape @ext}%, output - assert_match %r%^#{Regexp.escape make_command}$%, output - assert_match %r%^#{Regexp.escape make_command} install$%, output + assert_contains_make_command '', output + assert_contains_make_command 'install', output assert_match %r%test\.txt%, output end @@ -82,8 +82,8 @@ install (FILES test.txt DESTINATION bin) output = output.join "\n" - assert_match %r%^#{make_command}%, output - assert_match %r%^#{make_command} install%, output + assert_contains_make_command '', output + assert_contains_make_command 'install', output end end diff --git a/test/rubygems/test_gem_ext_configure_builder.rb b/test/rubygems/test_gem_ext_configure_builder.rb index 65d31f61af..6137795111 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 < Gem::TestCase assert_equal "sh ./configure --prefix=#{@dest_path}", output.shift assert_equal "", output.shift - assert_equal make_command, output.shift + assert_contains_make_command '', output.shift assert_match(/^ok$/m, output.shift) - assert_equal make_command + " install", output.shift + assert_contains_make_command 'install', output.shift assert_match(/^ok$/m, output.shift) end @@ -76,8 +76,8 @@ class TestGemExtConfigureBuilder < Gem::TestCase Gem::Ext::ConfigureBuilder.build nil, nil, @dest_path, output end - assert_equal make_command, output[0] - assert_equal "#{make_command} install", output[2] + assert_contains_make_command '', output[0] + assert_contains_make_command 'install', output[2] end end diff --git a/test/rubygems/test_gem_ext_ext_conf_builder.rb b/test/rubygems/test_gem_ext_ext_conf_builder.rb index 734569583a..7c55626248 100644 --- a/test/rubygems/test_gem_ext_ext_conf_builder.rb +++ b/test/rubygems/test_gem_ext_ext_conf_builder.rb @@ -32,14 +32,8 @@ class TestGemExtExtConfBuilder < Gem::TestCase 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_contains_make_command '', output[2] + assert_contains_make_command 'install', output[4] end def test_class_build_rbconfig_make_prog @@ -56,8 +50,8 @@ class TestGemExtExtConfBuilder < Gem::TestCase end assert_equal "creating Makefile\n", output[1] - assert_equal make_command, output[2] - assert_equal "#{make_command} install", output[4] + assert_contains_make_command '', output[2] + assert_contains_make_command 'install', output[4] ensure RbConfig::CONFIG['configure_args'] = configure_args end @@ -80,7 +74,7 @@ class TestGemExtExtConfBuilder < Gem::TestCase end assert_equal "creating Makefile\n", output[1] - assert_equal "anothermake", output[2] + assert_contains_make_command '', output[2] ensure RbConfig::CONFIG['configure_args'] = configure_args ENV['make'] = env_make @@ -132,8 +126,8 @@ checking for main\(\) in .*?nonexistent/m, error.message) Gem::Ext::ExtConfBuilder.make @ext, output end - assert_equal make_command, output[0] - assert_equal "#{make_command} install", output[2] + assert_contains_make_command '', output[0] + assert_contains_make_command 'install', output[2] end def test_class_make_no_Makefile |