Skip to content

Commit 1408a72

Browse files
author
blackhedd
committed
added a task for running the SNMP tests.
1 parent f6cb105 commit 1408a72

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

Rakefile

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ $tardist = "../#$distdir.tar.gz"
4242
$release_date = nil
4343
$release_date = Time.parse(ENV['RELEASE_DATE']) if ENV['RELEASE_DATE']
4444

45-
desc "Run the tests for #$name."
46-
task :test do |t|
45+
46+
def run_test_set the_task, testcases
4747
require 'test/unit/testsuite'
4848
require 'test/unit/ui/console/testrunner'
4949

5050
runner = Test::Unit::UI::Console::TestRunner
5151

5252
$LOAD_PATH.unshift('tests')
53-
$stderr.puts "Checking for test cases:" if t.verbose
54-
Dir['tests/test*.rb'].each do |testcase|
55-
$stderr.puts "\t#{testcase}" if t.verbose
53+
$stderr.puts "Checking for test cases:" if the_task.verbose
54+
testcases.each do |testcase|
55+
$stderr.puts "\t#{testcase}" if the_task.verbose
5656
load testcase
5757
end
5858

@@ -65,6 +65,16 @@ task :test do |t|
6565
runner.run(suite)
6666
end
6767

68+
desc "Run the tests for #$name."
69+
task :test do |t|
70+
run_test_set t, Dir['tests/test*.rb']
71+
end
72+
73+
desc "(Provisional) Run tests for SNMP"
74+
task :test_snmp do |t|
75+
run_test_set t, ['tests/test_snmp.rb']
76+
end
77+
6878
spec = eval(File.read("net-ldap.gemspec"))
6979
spec.version = $version
7080
desc "Build the RubyGem for #$name."

0 commit comments

Comments
 (0)