Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ end
desc "Run all debugger protocols (CAP & DAP) related tests"
Rake::TestTask.new(:test_protocol) do |t|
t.test_files = FileList["test/protocol/*_test.rb"]
t.options = "-v"
end

task test: 'test_console' do
Expand Down
2 changes: 1 addition & 1 deletion test/protocol/restart_raw_dap_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def test_restart_works_correctly_1644070899
command: "disconnect",
arguments: {
restart: true,
terminateDebuggee: true
terminateDebuggee: false
},
type: "request"
},
Expand Down
2 changes: 2 additions & 0 deletions test/support/console_test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ class ConsoleTestCase < TestCase
nr = ENV['RUBY_DEBUG_TEST_NO_REMOTE']
NO_REMOTE = nr == 'true' || nr == '1'

ASK_CMD = %w[quit q delete del kill undisplay].freeze

if !NO_REMOTE
warn "Tests on local and remote. You can disable remote tests with RUBY_DEBUG_TEST_NO_REMOTE=1."
end
Expand Down
12 changes: 5 additions & 7 deletions test/support/test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ class TestCase < Test::Unit::TestCase

MULTITHREADED_TEST = !(%w[1 true].include? ENV['RUBY_DEBUG_TEST_DISABLE_THREADS'])

RUBY = ENV['RUBY'] || RbConfig.ruby
RDBG_EXECUTABLE = "#{RUBY} #{__dir__}/../../exe/rdbg"

TIMEOUT_SEC = (ENV['RUBY_DEBUG_TIMEOUT_SEC'] || 10).to_i

include AssertionHelpers

def setup
Expand Down Expand Up @@ -87,17 +92,10 @@ def multithreaded_test?
Thread.current[:is_subthread]
end

ASK_CMD = %w[quit q delete del kill undisplay].freeze

def debug_print msg
print msg if ENV['RUBY_DEBUG_TEST_DEBUG_MODE']
end

RUBY = ENV['RUBY'] || RbConfig.ruby
RDBG_EXECUTABLE = "#{RUBY} #{__dir__}/../../exe/rdbg"

TIMEOUT_SEC = (ENV['RUBY_DEBUG_TIMEOUT_SEC'] || 10).to_i

private

def wait_pid pid, sec
Expand Down