Permalink
Browse files

added rake task to run test suite in gdb

  • Loading branch information...
1 parent e95a348 commit 10b09f8ee0072a8742209d64b2a2ea18cc52e8fc @flavorjones flavorjones committed Oct 21, 2008
Showing with 11 additions and 4 deletions.
  1. +11 −4 Rakefile
View
@@ -171,7 +171,7 @@ namespace :build do
task :externals => libs.map { |x| "cross/#{x}" } + ['cross/ruby-1.8.6-p287']
end
-def valgrind_cmdline
+def test_suite_cmdline
require 'find'
files = []
Find.find("test") do |f|
@@ -188,28 +188,35 @@ namespace :valgrind do
desc "run valgrind with basic ruby options on the test suite"
task :ruby => :build do
- cmdline = "valgrind #{VALGRIND_BASIC_OPTS} #{valgrind_cmdline}"
+ cmdline = "valgrind #{VALGRIND_BASIC_OPTS} #{test_suite_cmdline}"
puts cmdline
system cmdline
end
desc "run valgrind with memory-fill ruby options on the test suite"
task :ruby_mem => :build do
# fill malloced memory with "m" and freed memory with "f"
- cmdline = "valgrind #{VALGRIND_BASIC_OPTS} --freelist-vol=100000000 --malloc-fill=6D --free-fill=66 #{valgrind_cmdline}"
+ cmdline = "valgrind #{VALGRIND_BASIC_OPTS} --freelist-vol=100000000 --malloc-fill=6D --free-fill=66 #{test_suite_cmdline}"
puts cmdline
system cmdline
end
desc "run valgrind with memory-zero ruby options on the test suite"
task :ruby_mem0 => :build do
# fill malloced and freed memory with 0
- cmdline = "valgrind #{VALGRIND_BASIC_OPTS} --freelist-vol=100000000 --malloc-fill=00 --free-fill=00 #{valgrind_cmdline}"
+ cmdline = "valgrind #{VALGRIND_BASIC_OPTS} --freelist-vol=100000000 --malloc-fill=00 --free-fill=00 #{test_suite_cmdline}"
puts cmdline
system cmdline
end
end
+task :gdb => :build do
+ cmdline = "gdb --args #{test_suite_cmdline}"
+ puts cmdline
+ system cmdline
+end
+
+
Rake::Task[:test].prerequisites << :build
Rake::Task[:check_manifest].prerequisites << GENERATED_PARSER
Rake::Task[:check_manifest].prerequisites << GENERATED_TOKENIZER

0 comments on commit 10b09f8

Please sign in to comment.