[Groonga-commit] pgroonga/pgroonga at 20ebf3e [master] test: fix shared library extension detection

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Jan 4 01:13:54 JST 2017


Kouhei Sutou	2017-01-04 01:13:54 +0900 (Wed, 04 Jan 2017)

  New Revision: 20ebf3eb2cd82268ba6e4cd9dc50417d419e9143
  https://github.com/pgroonga/pgroonga/commit/20ebf3eb2cd82268ba6e4cd9dc50417d419e9143

  Message:
    test: fix shared library extension detection

  Modified files:
    test/helpers/sandbox.rb

  Modified: test/helpers/sandbox.rb (+11 -3)
===================================================================
--- test/helpers/sandbox.rb    2017-01-04 00:58:40 +0900 (107c4b9)
+++ test/helpers/sandbox.rb    2017-01-04 01:13:54 +0900 (1eb4349)
@@ -1,5 +1,4 @@
 require "fileutils"
-require "rbconfig"
 require "socket"
 require "stringio"
 
@@ -49,6 +48,17 @@ module Helpers
       [output, error]
     end
 
+    def dll_extension
+      case RUBY_PLATFORM
+      when /mingw|mswin|cygwin/
+        "dll"
+      when /darwin/
+        "dylib"
+      else
+        "so"
+      end
+    end
+
     def psql(db, sql)
       run_command("psql",
                   "--host", @host,
@@ -117,8 +127,6 @@ module Helpers
     end
 
     def setup_db
-      dll_extension = RbConfig::CONFIG["DLEXT"]
-
       @db_dir = File.join(@tmp_dir, "db")
       @socket_dir = File.join(@db_dir, "socket")
       @host = "127.0.0.1"
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index