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.

This commit is contained in:
Raphael Sofaer 2011-07-02 01:13:53 -07:00
parent 757b87e994
commit bc5d29bff3
2 changed files with 7 additions and 6 deletions

View file

@ -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"

View file

@ -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"