From bc5d29bff333f262b2788d2ff587f2f0ef729a32 Mon Sep 17 00:00:00 2001 From: Raphael Sofaer Date: Sat, 2 Jul 2011 01:13:53 -0700 Subject: [PATCH] Take some stuff out of the travis run, I think we need to use headless instead of an explicit xvfb. Turning off travis for now. --- .travis.yml | 1 + lib/tasks/cruise.rake | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6fc098476..4745160ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ rvm: before_script: - "sass --update public/stylesheets/sass/:public/stylesheets/" - "cp config/database.yml.example config/database.yml" + - "rm .rspec" - "rake db:create" - "rake db:schema:load" - "rspec spec --tag fixture" diff --git a/lib/tasks/cruise.rake b/lib/tasks/cruise.rake index 0c3ca3a9d..e7236272f 100644 --- a/lib/tasks/cruise.rake +++ b/lib/tasks/cruise.rake @@ -1,7 +1,13 @@ namespace :cruise do desc "Run all specs and features" task :cruise => [:environment, :'cruise:migrate'] do + puts "Starting virtual display..." run_cruise + puts "Cleaning up..." + FileUtils.rm_rf("#{Rails.root}/public/uploads/images") + FileUtils.rm_rf("#{Rails.root}/public/uploads/tmp") + raise "tests failed!" unless exit_status == 0 + puts "All tests passed!" end task :migrate do @@ -14,18 +20,12 @@ namespace :cruise do run_cruise end def run_cruise - puts "Starting virtual display..." `sh -e /etc/init.d/xvfb start` puts "Starting specs..." system('export DISPLAY=:99.0 && CI=true bundle exec rake') exit_status = $?.exitstatus puts "Stopping virtual display..." `sh -e /etc/init.d/xvfb stop` - puts "Cleaning up..." - FileUtils.rm_rf("#{Rails.root}/public/uploads/images") - FileUtils.rm_rf("#{Rails.root}/public/uploads/tmp") - raise "tests failed!" unless exit_status == 0 - puts "All tests passed!" end end task :cruise => "cruise:cruise"