Merge branch 'master' into 3408-production-datamanager
[arvados.git] / services / api / Rakefile
1 #!/usr/bin/env rake
2 # Add your own tasks in files placed in lib/tasks ending in .rake,
3 # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
5 require File.expand_path('../config/application', __FILE__)
6
7 begin
8   ok = PgPower
9 rescue
10   abort "Hm, pg_power is missing. Make sure you use 'bundle exec rake ...'"
11 end
12
13 Server::Application.load_tasks
14
15 namespace :test do
16   task(:run).clear
17   # Copied from the definition in Rails 3.2.
18   # This may need to be updated if we upgrade Rails.
19   task :run do
20     errors = %w(test:units test:functionals test:integration test:tasks).collect do |task|
21       begin
22         Rake::Task[task].invoke
23         nil
24       rescue => e
25         { :task => task, :exception => e }
26       end
27     end.compact
28
29     if errors.any?
30       puts errors.map { |e| "Errors running #{e[:task]}! #{e[:exception].inspect}" }.join("\n")
31       abort
32     end
33   end
34 end