some fixes to ensure runner times out on js failure in runtine

This commit is contained in:
John Bintz 2012-03-15 17:13:18 -04:00
parent 8f13485f54
commit 9a905a862f
3 changed files with 13 additions and 2 deletions

View File

@ -60,7 +60,7 @@ module Flowerbox
end
command :starting do
runner.did_start!
end
get %r{^/__F__/(.*)$} do |file|

View File

@ -7,11 +7,13 @@ module Flowerbox::Run
time = 0
realtime = Time.now.to_i
failed = false
runner_envs = Flowerbox.runner_environment.collect do |env|
env.ensure_configured!
result_set << env.run(sprockets, spec_files, options)
failed = true if !env.started?
time += env.time
@ -22,7 +24,7 @@ module Flowerbox::Run
runner_envs.each(&:cleanup)
result_set.exitstatus
failed ? 1 : result_set.exitstatus
rescue Flowerbox::Runner::Base::RunnerDiedError
255
end

View File

@ -11,6 +11,11 @@ module Flowerbox
def initialize
@results = ResultSet.new
@started = false
end
def started?
@started
end
def ensure_alive
@ -90,6 +95,10 @@ module Flowerbox
@results.time = time
end
def did_start!
@started = true
end
def server
return @server if @server