mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_extlibs.rb: skip excluded libraries
* test/ruby/test_extlibs.rb (TestExtLibs.check_existence): ignore tests for explicitly excluded libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
65f2103b46
commit
53662a711f
1 changed files with 20 additions and 4 deletions
|
@ -1,9 +1,11 @@
|
|||
require "envutil"
|
||||
require "shellwords"
|
||||
|
||||
class TestExtLibs < Test::Unit::TestCase
|
||||
@extdir = $".grep(/\/rbconfig\.rb\z/) {break "#$`/ext"}
|
||||
|
||||
def self.check_existence(ext, add_msg = nil)
|
||||
return if @excluded.any? {|i| File.fnmatch?(i, ext, File::FNM_CASEFOLD)}
|
||||
add_msg = ". #{add_msg}" if add_msg
|
||||
log = "#{@extdir}/#{ext}/mkmf.log"
|
||||
define_method("test_existence_of_#{ext}") do
|
||||
|
@ -24,6 +26,20 @@ class TestExtLibs < Test::Unit::TestCase
|
|||
/mswin|mingw/ =~ RUBY_PLATFORM
|
||||
end
|
||||
|
||||
excluded = [RbConfig::CONFIG, ENV].map do |conf|
|
||||
if args = conf['configure_args']
|
||||
args.shellsplit.grep(/\A--without-ext=/) {$'.split(/,/)}
|
||||
end
|
||||
end.flatten.compact
|
||||
excluded << '+' if excluded.empty?
|
||||
if windows?
|
||||
excluded.map! {|i| i == '+' ? ['pty', 'syslog'] : i}
|
||||
excluded.flatten!
|
||||
else
|
||||
excluded.map! {|i| i == '+' ? '*win32*' : i}
|
||||
end
|
||||
@excluded = excluded
|
||||
|
||||
check_existence "bigdecimal"
|
||||
check_existence "continuation"
|
||||
check_existence "coverage"
|
||||
|
@ -51,7 +67,7 @@ class TestExtLibs < Test::Unit::TestCase
|
|||
check_existence "openssl", "this may be false positive, but should assert because rubygems requires this"
|
||||
check_existence "pathname"
|
||||
check_existence "psych"
|
||||
check_existence "pty" unless windows?
|
||||
check_existence "pty"
|
||||
check_existence "racc/cparse"
|
||||
check_existence "rbconfig/sizeof"
|
||||
#check_existence "readline" # depend on libreadline
|
||||
|
@ -60,11 +76,11 @@ class TestExtLibs < Test::Unit::TestCase
|
|||
check_existence "socket"
|
||||
check_existence "stringio"
|
||||
check_existence "strscan"
|
||||
check_existence "syslog" unless windows?
|
||||
check_existence "syslog"
|
||||
check_existence "thread"
|
||||
#check_existence "tk" # depend on Tcl/Tk
|
||||
#check_existence "tk/tkutil" # depend on Tcl/Tk
|
||||
check_existence "Win32API" if windows?
|
||||
check_existence "win32ole" if windows?
|
||||
check_existence "Win32API"
|
||||
check_existence "win32ole"
|
||||
check_existence "zlib", "this may be false positive, but should assert because rubygems requires this"
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue