X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2d4263c16812a906589cbc13be26535a85691bd8..5386f6657234f3c24a4783cf63ab85016eda85b8:/services/api/Rakefile?ds=sidebyside diff --git a/services/api/Rakefile b/services/api/Rakefile index 17d5fe7202..22b25313a5 100644 --- a/services/api/Rakefile +++ b/services/api/Rakefile @@ -4,4 +4,31 @@ require File.expand_path('../config/application', __FILE__) +begin + ok = PgPower +rescue + abort "Hm, pg_power is missing. Make sure you use 'bundle exec rake ...'" +end + Server::Application.load_tasks + +namespace :test do + task(:run).clear + # Copied from the definition in Rails 3.2. + # This may need to be updated if we upgrade Rails. + task :run do + errors = %w(test:units test:functionals test:integration test:tasks).collect do |task| + begin + Rake::Task[task].invoke + nil + rescue => e + { :task => task, :exception => e } + end + end.compact + + if errors.any? + puts errors.map { |e| "Errors running #{e[:task]}! #{e[:exception].inspect}" }.join("\n") + abort + end + end +end