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

ruby-changes:44130

From: nobu <ko1@a...>
Date: Thu, 22 Sep 2016 15:35:35 +0900 (JST)
Subject: [ruby-changes:44130] nobu:r56203 (trunk): dlntest.dll: move

nobu	2016-09-22 15:35:27 +0900 (Thu, 22 Sep 2016)

  New Revision: 56203

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

  Log:
    dlntest.dll: move
    
    * ext/-test-/win32/dln/{depend,extconf.rb} (dlntest.dll): make
      under the extension directory, instead of the top directory.
    
    * test/-ext-/win32/test_dln.rb (test_check_imported): explicit
      PATH environment variable to load the DLL.

  Modified files:
    trunk/ext/-test-/win32/dln/depend
    trunk/ext/-test-/win32/dln/extconf.rb
    trunk/test/-ext-/win32/test_dln.rb
Index: test/-ext-/win32/test_dln.rb
===================================================================
--- test/-ext-/win32/test_dln.rb	(revision 56202)
+++ test/-ext-/win32/test_dln.rb	(revision 56203)
@@ -8,7 +8,11 @@ module Bug https://github.com/ruby/ruby/blob/trunk/test/-ext-/win32/test_dln.rb#L8
     class TestDln < Test::Unit::TestCase
       def test_check_imported
         bug = '[Bug #6303]'
-        assert_in_out_err(['-r-test-/win32/dln', '-eexit'], '', [], [], bug, timeout: 10)
+        so = File.expand_path("../ext/-test-/win32/dln/dlntest.dll", EnvUtil.rubybin)
+        assert_send([File, :file?, so])
+        path = ENV['PATH']
+        path = File.dirname(so) + RbConfig::CONFIG["PATH_SEPARATOR"] + path
+        assert_in_out_err([{'PATH'=>path}, '-r-test-/win32/dln', '-eexit'], '', [], [], bug, timeout: 10)
       end
 
       def test_nonascii_load
Index: ext/-test-/win32/dln/depend
===================================================================
--- ext/-test-/win32/dln/depend	(revision 56202)
+++ ext/-test-/win32/dln/depend	(revision 56203)
@@ -1,8 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ext/-test-/win32/dln/depend#L1
 $(TARGET_SO): $(DLNTESTLIB)
 
-$(DLNTESTLIB): $(topdir)/dlntest.dll
+$(DLNTESTLIB): dlntest.dll
 
-$(topdir)/dlntest.dll: libdlntest.o libdlntest.def
+dlntest.dll: libdlntest.o libdlntest.def
 	$(ECHO) linking shared-object $(@F)
 	-$(Q)$(RM) $@
 	-$(Q)$(MAKEDIRS) $(@D)
Index: ext/-test-/win32/dln/extconf.rb
===================================================================
--- ext/-test-/win32/dln/extconf.rb	(revision 56202)
+++ ext/-test-/win32/dln/extconf.rb	(revision 56203)
@@ -4,7 +4,7 @@ if $mingw or $mswin https://github.com/ruby/ruby/blob/trunk/ext/-test-/win32/dln/extconf.rb#L4
   $LOCAL_LIBS << " #{dlntestlib}"
   $srcs = ["dlntest.c"]
   $objs = ["dlntest.o"]
-  testdll = "$(topdir)/dlntest.dll"
+  testdll = "dlntest.dll"
   $cleanfiles << testdll
   $cleanfiles << "dlntest.#{$LIBEXT}"
   config_string('cleanobjs') {|t| $cleanfiles.concat(t.gsub(/\$\*/, 'dlntest').split)}
@@ -13,8 +13,8 @@ if $mingw or $mswin https://github.com/ruby/ruby/blob/trunk/ext/-test-/win32/dln/extconf.rb#L13
     m << "\n""DLNTESTLIB = #{dlntestlib}\n"
     if $mingw
       m << "\n"
-      m << "$(topdir)/dlntest.dll: DEFFILE := $(srcdir)/libdlntest.def\n"
-      m << "$(topdir)/dlntest.dll: DLDFLAGS += -Wl,--out-implib,$(DLNTESTLIB)\n"
+      m << "dlntest.dll: DEFFILE := $(srcdir)/libdlntest.def\n"
+      m << "dlntest.dll: DLDFLAGS += -Wl,--out-implib,$(DLNTESTLIB)\n"
     end
     m
   end

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

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