added a task for running the SNMP tests.

This commit is contained in:
blackhedd 2006-12-15 10:00:51 +00:00
parent f6cb105444
commit 1408a72c86

View file

@ -42,17 +42,17 @@ $tardist = "../#$distdir.tar.gz"
$release_date = nil $release_date = nil
$release_date = Time.parse(ENV['RELEASE_DATE']) if ENV['RELEASE_DATE'] $release_date = Time.parse(ENV['RELEASE_DATE']) if ENV['RELEASE_DATE']
desc "Run the tests for #$name."
task :test do |t| def run_test_set the_task, testcases
require 'test/unit/testsuite' require 'test/unit/testsuite'
require 'test/unit/ui/console/testrunner' require 'test/unit/ui/console/testrunner'
runner = Test::Unit::UI::Console::TestRunner runner = Test::Unit::UI::Console::TestRunner
$LOAD_PATH.unshift('tests') $LOAD_PATH.unshift('tests')
$stderr.puts "Checking for test cases:" if t.verbose $stderr.puts "Checking for test cases:" if the_task.verbose
Dir['tests/test*.rb'].each do |testcase| testcases.each do |testcase|
$stderr.puts "\t#{testcase}" if t.verbose $stderr.puts "\t#{testcase}" if the_task.verbose
load testcase load testcase
end end
@ -65,6 +65,16 @@ task :test do |t|
runner.run(suite) runner.run(suite)
end end
desc "Run the tests for #$name."
task :test do |t|
run_test_set t, Dir['tests/test*.rb']
end
desc "(Provisional) Run tests for SNMP"
task :test_snmp do |t|
run_test_set t, ['tests/test_snmp.rb']
end
spec = eval(File.read("net-ldap.gemspec")) spec = eval(File.read("net-ldap.gemspec"))
spec.version = $version spec.version = $version
desc "Build the RubyGem for #$name." desc "Build the RubyGem for #$name."