Permalink
Browse files

Cleaning up the Rakefile a bit.

  • Loading branch information...
1 parent 00580d9 commit 15bb372edb36bf5b895f50cbf785897c26dce029 @jbarnette committed Mar 26, 2009
Showing with 40 additions and 68 deletions.
  1. +3 −23 MANIFEST.txt
  2. +1 −45 Rakefile
  3. +36 −0 lib/tasks/testing.rake
View
26 MANIFEST.txt
@@ -1,11 +1,11 @@
.autotest
CHANGELOG.rdoc
-MANIFEST.txt
MINGW32.mk
+Manifest.txt
README.rdoc
Rakefile
bin/johnson
-cross-compile.txt
+docs/cross-compile.txt
ext/spidermonkey/context.c
ext/spidermonkey/context.h
ext/spidermonkey/conversions.c
@@ -32,14 +32,8 @@ ext/spidermonkey/runtime.h
ext/spidermonkey/spidermonkey.c
ext/spidermonkey/spidermonkey.h
johnson.gemspec
-js/johnson/browser.js
-js/johnson/browser/env.js
-js/johnson/browser/jquery.js
-js/johnson/browser/xmlsax.js
-js/johnson/browser/xmlw3cdom.js
js/johnson/cli.js
js/johnson/prelude.js
-js/johnson/template.js
lib/johnson.rb
lib/johnson/cli.rb
lib/johnson/cli/options.rb
@@ -71,9 +65,7 @@ lib/johnson/visitors/enumerating_visitor.rb
lib/johnson/visitors/sexp_visitor.rb
lib/johnson/visitors/visitor.rb
lib/rails/init.rb
-srcs/xmlparser-0.6.8.tar
-test/assets/index.html
-test/assets/jquery_test.html
+lib/tasks/testing.rake
test/helper.rb
test/johnson/browser_test.rb
test/johnson/conversions/array_test.rb
@@ -126,18 +118,6 @@ test/johnson/version_test.rb
test/johnson/visitors/dot_visitor_test.rb
test/johnson/visitors/enumerating_visitor_test.rb
test/johnson_test.rb
-test/jquery_units/simple.js
-test/jquery_units/test.js
-test/jquery_units/test_helper.js
-test/jquery_units/units/ajax.js
-test/jquery_units/units/core.js
-test/jquery_units/units/event.js
-test/jquery_units/units/fx.js
-test/jquery_units/units/offset.js
-test/jquery_units/units/selector.js
-test/jspec/helper.js
-test/jspec/jspec.js
-test/jspec/simple_spec.js
test/parser_test.rb
vendor/spidermonkey/.cvsignore
vendor/spidermonkey/Makefile.in
View
46 Rakefile
@@ -152,51 +152,7 @@ file GENERATED_NODE => ["ext/spidermonkey/immutable_node.c.erb", "vendor/spiderm
}
end
-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
- # interpreter
- VALGRIND_BASIC_OPTS = "--num-callers=50 --error-limit=no --partial-loads-ok=yes --undef-value-errors=no"
-
- desc "run test suite under valgrind with basic ruby options"
- task :valgrind => :build do
- cmdline = "valgrind #{VALGRIND_BASIC_OPTS} #{test_suite_cmdline}"
- puts cmdline
- system cmdline
- end
-
- desc "run test suite under valgrind with memory-fill ruby options"
- task :valgrind_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 #{test_suite_cmdline}"
- puts cmdline
- system cmdline
- end
-
- desc "run test suite under valgrind with memory-zero ruby options"
- task :valgrind_mem0 => :build 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}"
- puts cmdline
- system cmdline
- end
-
- desc "run test suite under gdb"
- task :gdb => :build do
- cmdline = "gdb --args #{test_suite_cmdline}"
- puts cmdline
- system cmdline
- end
-end
+Dir["lib/tasks/*.rake"].each { |f| load f }
# Evil evil hack. Do not run tests when gem installs
if ENV['RUBYARCHDIR']
View
36 lib/tasks/testing.rake
@@ -0,0 +1,36 @@
+namespace :test do
+ # partial-loads-ok and undef-value-errors necessary to ignore
+ # spurious (and eminently ignorable) warnings from the ruby
+ # interpreter
+ VALGRIND_BASIC_OPTS = "--num-callers=50 --error-limit=no --partial-loads-ok=yes --undef-value-errors=no"
+
+ desc "run test suite under valgrind with basic ruby options"
+ task :valgrind => :build do
+ cmdline = "valgrind #{VALGRIND_BASIC_OPTS} #{test_suite_cmdline}"
+ puts cmdline
+ system cmdline
+ end
+
+ desc "run test suite under valgrind with memory-fill ruby options"
+ task :valgrind_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 #{test_suite_cmdline}"
+ puts cmdline
+ system cmdline
+ end
+
+ desc "run test suite under valgrind with memory-zero ruby options"
+ task :valgrind_mem0 => :build 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}"
+ puts cmdline
+ system cmdline
+ end
+
+ desc "run test suite under gdb"
+ task :gdb => :build do
+ cmdline = "gdb --args #{test_suite_cmdline}"
+ puts cmdline
+ system cmdline
+ end
+end

0 comments on commit 15bb372

Please sign in to comment.