Skip to content
This repository has been archived by the owner on Aug 18, 2018. It is now read-only.

Commit

Permalink
Switch to Hoe 1.12.1.
Browse files Browse the repository at this point in the history
This release adds Hoe#make_test_cmd, which makes our test:gdb and
Valgrind tasks a lot simpler.
  • Loading branch information
jbarnette committed Apr 2, 2009
1 parent eaa8858 commit ab34a2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
10 changes: 5 additions & 5 deletions johnson.gemspec
Expand Up @@ -2,11 +2,11 @@

Gem::Specification.new do |s|
s.name = %q{johnson}
s.version = "1.0.0.20090326161333"
s.version = "1.0.0.20090402144841"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["John Barnette", "Aaron Patterson", "Yehuda Katz", "Matthew Draper"]
s.date = %q{2009-03-26}
s.date = %q{2009-04-02}
s.default_executable = %q{johnson}
s.description = %q{}
s.email = ["jbarnette@rubyforge.org", "aaron.patterson@gmail.com", "wycats@gmail.com", "matthew@trebex.net"]
Expand All @@ -30,15 +30,15 @@ Gem::Specification.new do |s|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<rake>, [">= 0"])
s.add_development_dependency(%q<rake-compiler>, [">= 0"])
s.add_development_dependency(%q<hoe>, [">= 1.11.0"])
s.add_development_dependency(%q<hoe>, [">= 1.12.1"])
else
s.add_dependency(%q<rake>, [">= 0"])
s.add_dependency(%q<rake-compiler>, [">= 0"])
s.add_dependency(%q<hoe>, [">= 1.11.0"])
s.add_dependency(%q<hoe>, [">= 1.12.1"])
end
else
s.add_dependency(%q<rake>, [">= 0"])
s.add_dependency(%q<rake-compiler>, [">= 0"])
s.add_dependency(%q<hoe>, [">= 1.11.0"])
s.add_dependency(%q<hoe>, [">= 1.12.1"])
end
end
17 changes: 4 additions & 13 deletions lib/tasks/testing.rake
@@ -1,12 +1,3 @@
def test_suite_cmdline
require 'find'
files = []
Find.find("test") do |f|
files << f if File.basename(f) =~ /.*test.*\.rb$/
end
cmdline = "#{RUBY} -w -I.:lib:ext:test -rtest/unit -e '%w[#{files.join(' ')}].each {|f| require f}'"
end

namespace :test do
# partial-loads-ok and undef-value-errors necessary to ignore
# spurious (and eminently ignorable) warnings from the ruby
Expand All @@ -15,30 +6,30 @@ namespace :test do

desc "run test suite under valgrind with basic ruby options"
task :valgrind => :compile do
cmdline = "valgrind #{VALGRIND_BASIC_OPTS} #{test_suite_cmdline}"
cmdline = "valgrind #{VALGRIND_BASIC_OPTS} ruby #{HOE.make_test_cmd}"
puts cmdline
system cmdline
end

desc "run test suite under valgrind with memory-fill ruby options"
task :valgrind_mem => :compile 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 #{test_suite_cmdline}"
cmdline = "valgrind #{VALGRIND_BASIC_OPTS} --freelist-vol=100000000 --malloc-fill=6D --free-fill=66 ruby #{HOE.make_test_cmd}"
puts cmdline
system cmdline
end

desc "run test suite under valgrind with memory-zero ruby options"
task :valgrind_mem0 => :compile do
# fill malloced and freed memory with 0
cmdline = "valgrind #{VALGRIND_BASIC_OPTS} --freelist-vol=100000000 --malloc-fill=00 --free-fill=00 #{test_suite_cmdline}"
cmdline = "valgrind #{VALGRIND_BASIC_OPTS} --freelist-vol=100000000 --malloc-fill=00 --free-fill=00 ruby #{HOE.make_test_cmd}"
puts cmdline
system cmdline
end

desc "run test suite under gdb"
task :gdb => :compile do
cmdline = "gdb --args #{test_suite_cmdline}"
cmdline = "gdb --args ruby #{HOE.make_test_cmd}"
puts cmdline
system cmdline
end
Expand Down

0 comments on commit ab34a2d

Please sign in to comment.