1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
mperham--sidekiq/myapp/Rakefile

33 lines
697 B
Text
Raw Normal View History

#!/usr/bin/env rake
require File.expand_path('../config/application', __FILE__)
task :test do
require 'timeout'
%(production development).each do |env|
pid = fork do
ENV['RAILS_ENV'] = env
puts eval(File.read("integration_test.rb"))
end
begin
Timeout.timeout(20) do
Process.wait
end
rescue Timeout::Error
Process.kill 9, pid
# collect status so it doesn't stick around as zombie process
Process.wait pid
end
puts "#{server} child exited, pid = #{pid}"
Process.wait4(pid)
end
end
if !ENV["APPRAISAL_INITIALIZED"] && !ENV["TRAVIS"]
task :default => :appraisal
else
task :default => :test
end