[前][次][番号順一覧][スレッド一覧]

ruby-changes:36930

From: usa <ko1@a...>
Date: Fri, 26 Dec 2014 00:15:31 +0900 (JST)
Subject: [ruby-changes:36930] usa:r49011 (trunk): * test/ruby/test_extlibs.rb: check existance of extension libraries

usa	2014-12-26 00:15:18 +0900 (Fri, 26 Dec 2014)

  New Revision: 49011

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49011

  Log:
    * test/ruby/test_extlibs.rb: check existance of extension libraries
      which not depend on outer libraries. (experimental)

  Added files:
    trunk/test/ruby/test_extlibs.rb
  Modified files:
    trunk/ChangeLog
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 49010)
+++ ChangeLog	(revision 49011)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Dec 26 00:13:48 2014  NAKAMURA Usaku  <usa@r...>
+
+	* test/ruby/test_extlibs.rb: check existance of extension libraries
+	  which not depend on outer libraries. (experimental)
+
 Thu Dec 25 21:58:15 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/fiddle/extconf.rb: make PIC objects if it will be linked as
Index: test/ruby/test_extlibs.rb
===================================================================
--- test/ruby/test_extlibs.rb	(revision 0)
+++ test/ruby/test_extlibs.rb	(revision 49011)
@@ -0,0 +1,52 @@ https://github.com/ruby/ruby/blob/trunk/test/ruby/test_extlibs.rb#L1
+class TestExtLibs < Test::Unit::TestCase
+  def self.check_existance(ext, add_msg = nil)
+    add_msg = ".  #{add_msg}" if add_msg
+    define_method("test_existance_of_#{ext.gsub(%r'/', '_')}") do
+      assert_nothing_raised("extension library `#{ext}' is not found#{add_msg}") do
+        require ext
+      end
+    end
+  end
+
+  def windows?
+    /mswin|mingw/ =~ RUBY_PLATFORM
+  end
+
+  check_existance "bigdecimal"
+  check_existance "continuation"
+  check_existance "coverage"
+  #check_existance "curses" # depend on libcurses
+  check_existance "date"
+  #check_existance "dbm" # depend on libdbm
+  check_existance "digest"
+  check_existance "etc"
+  check_existance "fcntl"
+  check_existance "fiber"
+  check_existance "fiddle"
+  #check_existance "gdbm" # depend on libgdbm
+  check_existance "io/console"
+  check_existance "io/nonblock"
+  check_existance "io/wait"
+  check_existance "json"
+  check_existance "mathn"
+  check_existance "nkf"
+  check_existance "objspace"
+  check_existance "openssl", "this may be false positive, but should assert because rubygems requires this"
+  check_existance "pathname"
+  check_existance "psych"
+  check_existance "pty" unless windows?
+  check_existance "racc/cparse"
+  check_existance "rbconfig"
+  #check_existance "readline" # depend on libreadline
+  check_existance "ripper"
+  check_existance "sdbm"
+  check_existance "socket"
+  check_existance "stringio"
+  check_existance "strscan"
+  check_existance "syslog" unless windows?
+  check_existance "thread"
+  #check_existance "tk"  # depend on Tcl/Tk
+  check_existance "Win32API" if windows?
+  check_existance "win32ole" if windows?
+  check_existance "zlib", "this may be false positive, but should assert because rubygems requires this"
+end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]