diff --git a/lib/debug/version.rb b/lib/debug/version.rb index cf7b7b23e..a99cc3143 100644 --- a/lib/debug/version.rb +++ b/lib/debug/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module DEBUGGER__ - VERSION = "1.9.2" + VERSION = "1.9.2" ### end diff --git a/test/support/test_case.rb b/test/support/test_case.rb index 5ff8a2e27..bb426639b 100644 --- a/test/support/test_case.rb +++ b/test/support/test_case.rb @@ -168,10 +168,26 @@ def setup_remote_debuggee(cmd) remote_info.debuggee_backlog = [] line = nil + lines = [] msg1 = msg2 = nil + redo_cnt = 0 Timeout.timeout(TIMEOUT_SEC) do - line = remote_info.r.gets + begin + eof = remote_info.r.eof? # check first byte + line = +"" + while true + c = remote_info.r.read(1) + break if c == "\n" + line << c + end + + # line << remote_info.r.gets + rescue Errno::EIO + pp(cmd: cmd, env: {'HOME' => homedir}, eof: eof, line: line, redo_cnt: redo_cnt, msg1: msg1, msg2: msg2, lines: lines) + raise + end + lines << line remote_info.debuggee_backlog << line # wait for two lines (order is unstable) @@ -183,6 +199,7 @@ def setup_remote_debuggee(cmd) end break if msg1 && msg2 + redo_cnt += 1 redo # loop end