blob: 2d05d3c9a6e9a09b019dcb57866d10ab5361f9cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
namespace :test do
desc 'run all sample tests'
task :samples do
ruby "./sample/suite.rb"
end
desc 'run functional tests'
task :functional do
ruby "./test/functional/suite.rb"
end
namespace :functional do
desc 'run all functional tests on all supported Ruby platforms'
task :all do
$stdout.sync = true
for task in %w(test:functional 19 test:functional jruby test:functional ee test:functional)
if task == 'test:functional'
puts "\n\nTesting with #{RUBY}..."
Rake::Task['test:functional'].reenable
Rake::Task['test:functional'].invoke
else
Rake::Task[task].invoke
end
end
end
end
desc 'run all scanner tests'
task :scanners do
ruby "./test/scanners/suite.rb"
end
desc 'clean test output files'
task :clean do
for file in Dir['test/scanners/**/*.actual.*']
rm file
end
end
desc 'run all tests on all supported Ruby platforms'
task :all do
$stdout.sync = true
for task in %w(test 19 test jruby test ee test)
if task == 'test'
puts "\n\nTesting with #{RUBY}..."
Rake::Task['test'].reenable
Rake::Task['test:functional'].reenable
Rake::Task['test:scanners'].reenable
Rake::Task['test'].invoke
else
Rake::Task[task].invoke
end
end
end
end
task :test => %w( test:functional test:scanners )
task :samples => 'test:samples'
|