ruby-changes:44546
From: shugo <ko1@a...>
Date: Sun, 6 Nov 2016 10:06:50 +0900 (JST)
Subject: [ruby-changes:44546] shugo:r56619 (trunk): * test/ruby/test_optimization.rb (test_tailcall_interrupted_by_sigint):
shugo 2016-11-06 10:06:45 +0900 (Sun, 06 Nov 2016) New Revision: 56619 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56619 Log: * test/ruby/test_optimization.rb (test_tailcall_interrupted_by_sigint): don't use sleep to run faster. Modified files: trunk/ChangeLog trunk/test/ruby/test_optimization.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 56618) +++ ChangeLog (revision 56619) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Nov 6 10:03:00 2016 Shugo Maeda <shugo@r...> + + * test/ruby/test_optimization.rb (test_tailcall_interrupted_by_sigint): + don't use sleep to run faster. + Sun Nov 6 09:58:47 2016 Nobuyoshi Nakada <nobu@r...> * process.c (rb_exec_fillarg): honor the given path environment Index: test/ruby/test_optimization.rb =================================================================== --- test/ruby/test_optimization.rb (revision 56618) +++ test/ruby/test_optimization.rb (revision 56619) @@ -328,18 +328,21 @@ eval <<EOF https://github.com/ruby/ruby/blob/trunk/test/ruby/test_optimization.rb#L328 def foo foo end +puts("start") +STDOUT.flush foo EOF EOS - err = EnvUtil.invoke_ruby([], "", true, true, {}) { + status, err = EnvUtil.invoke_ruby([], "", true, true, {}) { |in_p, out_p, err_p, pid| in_p.write(script) in_p.close - sleep(1) + out_p.gets Process.kill(:SIGINT, pid) - Process.wait(pid) - err_p.read + *, stat = Process.wait2(pid) + [stat, err_p.read] } + assert_equal(Signal.list["INT"], status.termsig) assert_match(/Interrupt/, err, bug) end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/