summaryrefslogtreecommitdiff
path: root/test/ruby/test_extlibs.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-28 14:04:26 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-28 14:04:26 +0000
commit8b5c69fa974ffa5e5367c12edc3834d5f198aac0 (patch)
tree77f430a6b666303f6b5e7602235355b142da306e /test/ruby/test_extlibs.rb
parent64241b0921e2ae24dd69d225e5d59de5dde77ac5 (diff)
test_extlibs.rb: show mkmf.log
* test/ruby/test_extlibs.rb (check_existence): show mkmf.log of failed extension libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_extlibs.rb')
-rw-r--r--test/ruby/test_extlibs.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/ruby/test_extlibs.rb b/test/ruby/test_extlibs.rb
index 5016692..7f8f033 100644
--- a/test/ruby/test_extlibs.rb
+++ b/test/ruby/test_extlibs.rb
@@ -1,11 +1,19 @@
require "envutil"
class TestExtLibs < Test::Unit::TestCase
+ @extdir = $".grep(/\/rbconfig\.rb\z/) {break "#$`/ext"}
+
def self.check_existence(ext, add_msg = nil)
add_msg = ". #{add_msg}" if add_msg
+ log = "#{@extdir}/#{ext}/mkmf.log"
define_method("test_existence_of_#{ext}") do
assert_separately([], <<-"end;", ignore_stderr: true) # do
- assert_nothing_raised("extension library `#{ext}' is not found#{add_msg}") do
+ log = #{log.dump}
+ msg = proc {
+ "extension library `#{ext}' is not found#{add_msg}\n" <<
+ (File.exist?(log) ? File.read(log) : "\#{log} not found")
+ }
+ assert_nothing_raised(msg) do
require "#{ext}"
end
end;