diff options
author | Jun Aruga <jaruga@redhat.com> | 2021-10-15 13:47:32 +0200 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-11-09 21:21:34 +0900 |
commit | d713b602eaf798b2b429347a772dc7268ce063be (patch) | |
tree | 6e87451d32837e7ceff4d5a99cec00eec1b2c77a /test/rubygems/test_gem_ext_ext_conf_builder.rb | |
parent | ec6352c10848553b7e8ddbc9f400aaae3358d5ab (diff) | |
download | ruby-d713b602eaf798b2b429347a772dc7268ce063be.tar.gz |
[rubygems/rubygems] Fix assert_contains_make_command on make defined by environment variable.
The `parse_make_command_line` in `assert_contains_make_command` fails to get
the make targets correctly, when the make command is set with make options by
environment variable such as `export make='make -j2'` at
lib/rubygems/ext/builder.rb::make.
So, we include the make options (eg, -XX) as a part of the command to fix the
case. Note that this commit still doesn't fix the case of
`export make='make -j 2'`.
https://github.com/rubygems/rubygems/commit/7730ef3fa0
Diffstat (limited to 'test/rubygems/test_gem_ext_ext_conf_builder.rb')
-rw-r--r-- | test/rubygems/test_gem_ext_ext_conf_builder.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/rubygems/test_gem_ext_ext_conf_builder.rb b/test/rubygems/test_gem_ext_ext_conf_builder.rb index 70833f35cf..10a544cbbc 100644 --- a/test/rubygems/test_gem_ext_ext_conf_builder.rb +++ b/test/rubygems/test_gem_ext_ext_conf_builder.rb @@ -66,8 +66,11 @@ class TestGemExtExtConfBuilder < Gem::TestCase end end - def test_class_build_env_make - env_make = ENV.delete 'MAKE' + def test_class_build_env_MAKE + env_make = ENV.delete 'make' + ENV['make'] = nil + + env_MAKE = ENV.delete 'MAKE' ENV['MAKE'] = 'anothermake' if java_platform? @@ -89,7 +92,8 @@ class TestGemExtExtConfBuilder < Gem::TestCase assert_contains_make_command 'clean', output[4] end ensure - ENV['MAKE'] = env_make + ENV['MAKE'] = env_MAKE + ENV['make'] = env_make end def test_class_build_extconf_fail |