@@ -11,6 +11,19 namespace :test do | |||
|
11 | 11 | system("open coverage/index.html") if PLATFORM['darwin'] |
|
12 | 12 | end |
|
13 | 13 | |
|
14 | desc 'Run unit and functional scm tests' | |
|
15 | task :scm do | |
|
16 | errors = %w(test:scm:units test:scm:functionals).collect do |task| | |
|
17 | begin | |
|
18 | Rake::Task[task].invoke | |
|
19 | nil | |
|
20 | rescue => e | |
|
21 | task | |
|
22 | end | |
|
23 | end.compact | |
|
24 | abort "Errors running #{errors.to_sentence(:locale => :en)}!" if errors.any? | |
|
25 | end | |
|
26 | ||
|
14 | 27 | namespace :scm do |
|
15 | 28 | namespace :setup do |
|
16 | 29 | desc "Creates directory for test repositories" |
@@ -37,5 +50,19 namespace :test do | |||
|
37 | 50 | desc "Creates all test repositories" |
|
38 | 51 | task :all => supported_scms |
|
39 | 52 | end |
|
53 | ||
|
54 | Rake::TestTask.new(:units => "db:test:prepare") do |t| | |
|
55 | t.libs << "test" | |
|
56 | t.verbose = true | |
|
57 | t.test_files = FileList['test/unit/repository*_test.rb'] + FileList['test/unit/lib/redmine/scm/**/*_test.rb'] | |
|
58 | end | |
|
59 | Rake::Task['test:scm:units'].comment = "Run the scm unit tests" | |
|
60 | ||
|
61 | Rake::TestTask.new(:functionals => "db:test:prepare") do |t| | |
|
62 | t.libs << "test" | |
|
63 | t.verbose = true | |
|
64 | t.test_files = FileList['test/functional/repositories*_test.rb'] | |
|
65 | end | |
|
66 | Rake::Task['test:scm:functionals'].comment = "Run the scm unit tests" | |
|
40 | 67 | end |
|
41 | 68 | end |
General Comments 0
You need to be logged in to leave comments.
Login now