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

ruby-changes:35256

From: usa <ko1@a...>
Date: Sun, 31 Aug 2014 16:35:13 +0900 (JST)
Subject: [ruby-changes:35256] usa:r47338 (ruby_2_0_0): merge revision(s) 45953, 45961: [Backport #9767]

usa	2014-08-31 16:35:06 +0900 (Sun, 31 Aug 2014)

  New Revision: 47338

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

  Log:
    merge revision(s) 45953,45961: [Backport #9767]
    
    * lib/test/unit/parallel.rb: fix test-all parallel failure if a test
      is skipped after raise.
      DL::TestFunc#test_sinf is skipped after raise on mingw ruby.
      But it causes Mashal.load failure due to undefined class/module
      DL::DLError when doing test-all parallel and test-all doesn't
      complete. We create new MiniTest::Skip object to avoid Mashal.load
      failure.
      [ruby-core:62133] [Bug #9767]
    
    * test/testunit/test_parallel.rb (TestParallel): add a test.
    
    * test/testunit/tests_for_parallel/ptest_forth.rb: ditto.
      But it causes Marshal.load failure due to undefined class/module
      complete. We create new MiniTest::Skip object to avoid Marshal.load

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/lib/test/unit/parallel.rb
    branches/ruby_2_0_0/test/testunit/test_parallel.rb
    branches/ruby_2_0_0/test/testunit/tests_for_parallel/ptest_forth.rb
    branches/ruby_2_0_0/version.h
Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 47337)
+++ ruby_2_0_0/ChangeLog	(revision 47338)
@@ -1,3 +1,18 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Sun Aug 31 16:32:10 2014  Hiroshi Shirosaki  <h.shirosaki@g...>
+
+	* lib/test/unit/parallel.rb: fix test-all parallel failure if a test
+	  is skipped after raise.
+	  DL::TestFunc#test_sinf is skipped after raise on mingw ruby.
+	  But it causes Marshal.load failure due to undefined class/module
+	  DL::DLError when doing test-all parallel and test-all doesn't
+	  complete. We create new MiniTest::Skip object to avoid Marshal.load
+	  failure.
+	  [ruby-core:62133] [Bug #9767]
+
+	* test/testunit/test_parallel.rb (TestParallel): add a test.
+
+	* test/testunit/tests_for_parallel/ptest_forth.rb: ditto.
+
 Sun Aug 31 16:24:54 2014  Tanaka Akira  <akr@f...>
 
 	* ext/pathname/lib/pathname.rb (cleanpath_aggressive): make all
Index: ruby_2_0_0/lib/test/unit/parallel.rb
===================================================================
--- ruby_2_0_0/lib/test/unit/parallel.rb	(revision 47337)
+++ ruby_2_0_0/lib/test/unit/parallel.rb	(revision 47338)
@@ -155,6 +155,11 @@ module Test https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/lib/test/unit/parallel.rb#L155
       end
 
       def puke(klass, meth, e)
+        if e.is_a?(MiniTest::Skip)
+          new_e = MiniTest::Skip.new(e.message)
+          new_e.set_backtrace(e.backtrace)
+          e = new_e
+        end
         @partial_report << [klass.name, meth, e.is_a?(MiniTest::Assertion) ? e : ProxyError.new(e)]
         super
       end
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 47337)
+++ ruby_2_0_0/version.h	(revision 47338)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
 #define RUBY_RELEASE_DATE "2014-08-31"
-#define RUBY_PATCHLEVEL 538
+#define RUBY_PATCHLEVEL 539
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 8
Index: ruby_2_0_0/test/testunit/tests_for_parallel/ptest_forth.rb
===================================================================
--- ruby_2_0_0/test/testunit/tests_for_parallel/ptest_forth.rb	(revision 47337)
+++ ruby_2_0_0/test/testunit/tests_for_parallel/ptest_forth.rb	(revision 47338)
@@ -15,6 +15,14 @@ class TestE < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/testunit/tests_for_parallel/ptest_forth.rb#L15
     assert_equal(0,1)
   end
 
+  def test_skip_after_unknown_error
+    begin
+      raise UnknownError, "unknown error"
+    rescue
+      skip "after raise"
+    end
+  end
+
   def test_unknown_error
     raise UnknownError, "unknown error"
   end
Index: ruby_2_0_0/test/testunit/test_parallel.rb
===================================================================
--- ruby_2_0_0/test/testunit/test_parallel.rb	(revision 47337)
+++ ruby_2_0_0/test/testunit/test_parallel.rb	(revision 47338)
@@ -91,7 +91,7 @@ module TestParallel https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/testunit/test_parallel.rb#L91
       timeout(10) do
         @worker_in.puts "run #{TESTS}/ptest_forth.rb test"
         i = 0
-        6.times { @worker_out.gets }
+        7.times { @worker_out.gets }
         buf = @worker_out.gets
         assert_match(/^done (.+?)$/, buf)
 
@@ -99,7 +99,7 @@ module TestParallel https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/testunit/test_parallel.rb#L99
 
         result = Marshal.load($1.chomp.unpack("m")[0])
 
-        assert_equal(4, result[0])
+        assert_equal(5, result[0])
         assert_equal(2, result[1])
         assert_kind_of(Array,result[2])
         assert_kind_of(Array,result[3])
@@ -107,7 +107,8 @@ module TestParallel https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/testunit/test_parallel.rb#L107
         assert_kind_of(Array,result[2][1])
         assert_kind_of(MiniTest::Assertion,result[2][0][2])
         assert_kind_of(MiniTest::Skip,result[2][1][2])
-        assert_kind_of(Exception, result[2][2][2])
+        assert_kind_of(MiniTest::Skip,result[2][2][2])
+        assert_kind_of(Exception, result[2][3][2])
         assert_equal(result[5], "TestE")
       end
     end
@@ -157,7 +158,7 @@ module TestParallel https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/testunit/test_parallel.rb#L158
     def test_should_run_all_without_any_leaks
       spawn_runner
       buf = timeout(10){@test_out.read}
-      assert_match(/^[SFE\.]{8}$/,buf)
+      assert_match(/^[SFE\.]{9}$/,buf)
     end
 
     def test_should_retry_failed_on_workers

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r45953,45961


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

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