Apache Solr open-source search software
remove temporary test data directory before running functional tests, and convert to rm_rf instead of rm_f in other places, and also set the default task to unit test instead of unit+functional tests
Erik Hatcherb9f5817c3c56
diff --git a/client/ruby/solrb/Rakefile b/client/ruby/solrb/Rakefileindex afece2b8b0d..96b5987a2a9 100644--- a/client/ruby/solrb/Rakefile+++ b/client/ruby/solrb/Rakefile@@ -39,7 +39,7 @@ require 'rake/packagetask'require 'rake/gempackagetask'require 'test/functional/test_solr_server'-task :default => [:test]+task :default => [:test_units]spec = Gem::Specification.new do |s|s.name = 'solrb'@@ -72,6 +72,7 @@ Rake::TestTask.new(:test_units) do |t|t.ruby_opts = ['-r solr', '-r test/unit', '-Itest/unit']end+# NOTE: test_functionals does not work standalone currently. It needs the TestSolrServer wrapper in the :test taskRake::TestTask.new(:test_functionals) do |t|t.pattern = 'test/functional/*_test.rb't.verbose = true@@ -82,6 +83,8 @@ task :test do# unit tests don't require a solr serverRake::Task[:test_units].invoke+ rm_rf "test/data" # remove functional test temp data directory+# wrap functional tests with a test-specific Solr servergot_error = TestSolrServer.wrap(:quiet => ENV['SOLR_CONSOLE'] ? false : true) doRake::Task[:test_functionals].invoke@@ -94,8 +97,8 @@ namespace :test dodesc 'Measures test coverage'# borrowed from here: http://clarkware.com/cgi/blosxom/2007/01/05#RcovRakeTasktask :coverage do- rm_f "coverage"- rm_f "coverage.data"+ rm_rf "coverage"+ rm_rf "coverage.data"TestSolrServer.wrap dosystem("rcov --aggregate coverage.data --text-summary -Ilib:test/functional test/functional/*_test.rb")end