We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
test:gdb
1 parent a6e47d8 commit 7b25a20Copy full SHA for 7b25a20
rakelib/test.rake
@@ -15,10 +15,21 @@ Minitest::TestTask.create(:test, &test_config)
15
16
begin
17
require "ruby_memcheck"
18
+rescue LoadError => e
19
+ warn("NOTE: ruby_memcheck is not available in this environment: #{e}")
20
+end
21
- namespace :test do
22
+class GdbTestTask < Minitest::TestTask
23
+ def ruby(*args, **options, &block)
24
+ command = "gdb --args #{RUBY} #{args.join(" ")}"
25
+ sh(command, **options, &block)
26
+ end
27
28
+
29
+namespace :test do
30
+ if defined?(RubyMemcheck)
31
RubyMemcheck::TestTask.new(:valgrind, &test_config)
32
end
-rescue LoadError => e
- warn("NOTE: ruby_memcheck is not available in this environment: #{e}")
33
34
+ GdbTestTask.create(:gdb)
35
0 commit comments