Skip to content

Instantly share code, notes, and snippets.

@palexander
Created December 4, 2013 00:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save palexander/7780172 to your computer and use it in GitHub Desktop.
Save palexander/7780172 to your computer and use it in GitHub Desktop.
@@ -27,6 +27,7 @@ namespace :docker do
pids = []
forks.times do |i|
pids << fork do
+ begin
##
# Configure your environment
# You'll want to do something here to make the environment
@@ -49,7 +50,9 @@ namespace :docker do
# Run the tests
MiniTest::Unit.runner.run
-
+ rescue => e
+ sio << "\n#{e.message}\n#{e.backtrace.join("\t\n")}"
+ ensure
# reset stdout
$stdout = STDOUT
sio.rewind
@@ -63,6 +66,7 @@ namespace :docker do
Kernel.exit!
end
end
+ end
# Wait for the forks to finish the tests
pids.each {|pid| Process.wait(pid)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment