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

ruby-changes:29313

From: nagachika <ko1@a...>
Date: Tue, 18 Jun 2013 02:56:22 +0900 (JST)
Subject: [ruby-changes:29313] nagachika:r41365 (ruby_2_0_0): merge revision(s) 40059,40061:

nagachika	2013-06-18 02:54:44 +0900 (Tue, 18 Jun 2013)

  New Revision: 41365

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

  Log:
    merge revision(s) 40059,40061:
    
    * test/ruby/envutil.rb (assert_separately): stop_auto_run of
      Test::Unit::Runner to prevent auto runner use ARGV.
    
    * test/ruby/envutil.rb (assert_separately): add $: to separate process.
    
    * test/ruby/envutil.rb (assert_separately): fail if stderr is not
      empty and ignore_stderr is false.

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/test/ruby/envutil.rb
    branches/ruby_2_0_0/test/ruby/test_require.rb
    branches/ruby_2_0_0/version.h

Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 41364)
+++ ruby_2_0_0/ChangeLog	(revision 41365)
@@ -1,3 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Tue Jun 18 02:49:20 2013  NARUSE, Yui  <naruse@r...>
+
+	* test/ruby/envutil.rb (assert_separately): stop_auto_run of
+	  Test::Unit::Runner to prevent auto runner use ARGV.
+
+	* test/ruby/envutil.rb (assert_separately): add $: to separate process.
+
+	* test/ruby/envutil.rb (assert_separately): fail if stderr is not
+	  empty and ignore_stderr is false.
+
 Tue Jun 18 02:21:54 2013  NARUSE, Yui  <naruse@r...>
 
 	* test/ruby/envutil.rb (EnvUtil.with_default_external): add for
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 41364)
+++ ruby_2_0_0/version.h	(revision 41365)
@@ -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 "2013-06-18"
-#define RUBY_PATCHLEVEL 225
+#define RUBY_PATCHLEVEL 226
 
 #define RUBY_RELEASE_YEAR 2013
 #define RUBY_RELEASE_MONTH 6
Index: ruby_2_0_0/test/ruby/test_require.rb
===================================================================
--- ruby_2_0_0/test/ruby/test_require.rb	(revision 41364)
+++ ruby_2_0_0/test/ruby/test_require.rb	(revision 41365)
@@ -423,7 +423,7 @@ class TestRequire < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/test_require.rb#L423
     # in C-level.  And redirecting stderr to a pipe seems to change
     # some blocking timings and causes a deadlock, so run in a
     # separated process for the time being.
-    assert_separately(["-w", "-", path, bug5754], <<-'end;')
+    assert_separately(["-w", "-", path, bug5754], <<-'end;', ignore_stderr: true)
     path, bug5754 = *ARGV
     start = false
 
Index: ruby_2_0_0/test/ruby/envutil.rb
===================================================================
--- ruby_2_0_0/test/ruby/envutil.rb	(revision 41364)
+++ ruby_2_0_0/test/ruby/envutil.rb	(revision 41365)
@@ -286,17 +286,31 @@ module Test https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/envutil.rb#L286
   ensure
     puts [Marshal.dump($!)].pack('m'), "assertions=\#{self._assertions}"
   end
+  class Test::Unit::Runner
+    @@stop_auto_run = true
+  end
 eom
+        args = args.dup
+        $:.each{|l| args.unshift "-I#{l}" }
+        ignore_stderr = opt.delete(:ignore_stderr)
         stdout, stderr, status = EnvUtil.invoke_ruby(args, src, true, true, opt)
         abort = status.coredump? || (status.signaled? && ABORT_SIGNALS.include?(status.termsig))
         assert(!abort, FailDesc[status, stderr])
         self._assertions += stdout[/^assertions=(\d+)/, 1].to_i
         res = Marshal.load(stdout.unpack("m")[0])
-        return unless res
-        res.backtrace.each do |l|
-          l.sub!(/\A-:(\d+)/){"#{file}:#{line + $1.to_i}"}
+        if res
+          res.backtrace.each do |l|
+            l.sub!(/\A-:(\d+)/){"#{file}:#{line + $1.to_i}"}
+          end
+          raise res
+        end
+
+        # really is it succeed?
+        unless ignore_stderr
+          # the body of assert_separately must not output anything to detect errror
+          assert_equal("", stderr, "assert_separately failed with error message")
         end
-        raise res
+        assert_equal(0, status, "assert_separately failed: '#{stderr}'")
       end
 
       def assert_warning(pat, message = nil)

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r40059,40061


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

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