From 88053b32aece58d8fb3f747a283df4a119064487 Mon Sep 17 00:00:00 2001 From: Nick Gauthier Date: Thu, 2 Sep 2010 16:11:32 -0500 Subject: [PATCH 1/5] Version bump to 0.22.0 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 8854156..2157409 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.21.0 +0.22.0 From fcad8a27ccdbcacfafc9bc50c10ed88fe7c38694 Mon Sep 17 00:00:00 2001 From: Nick Gauthier Date: Thu, 2 Sep 2010 16:12:03 -0500 Subject: [PATCH 2/5] Version 0.22.0: Worker preload file. OSX tmpdir fix. Thanks @weplay --- hydra.gemspec | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/hydra.gemspec b/hydra.gemspec index 8e3269f..e86f3a9 100644 --- a/hydra.gemspec +++ b/hydra.gemspec @@ -5,11 +5,11 @@ Gem::Specification.new do |s| s.name = %q{hydra} - s.version = "0.21.0" + s.version = "0.22.0" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Nick Gauthier"] - s.date = %q{2010-08-23} + s.date = %q{2010-09-02} s.default_executable = %q{warmsnake.rb} s.description = %q{Spread your tests over multiple machines to test your code faster.} s.email = %q{nick@smartlogicsolutions.com} @@ -56,6 +56,7 @@ Gem::Specification.new do |s| "lib/hydra/stdio.rb", "lib/hydra/sync.rb", "lib/hydra/tasks.rb", + "lib/hydra/tmpdir.rb", "lib/hydra/trace.rb", "lib/hydra/worker.rb", "test/fixtures/assert_true.rb", @@ -88,21 +89,21 @@ Gem::Specification.new do |s| s.summary = %q{Distributed testing toolkit} s.test_files = [ "test/pipe_test.rb", - "test/sync_test.rb", + "test/test_helper.rb", "test/ssh_test.rb", + "test/message_test.rb", + "test/master_test.rb", + "test/fixtures/write_file.rb", + "test/fixtures/slow.rb", + "test/fixtures/write_file_with_pending_spec.rb", + "test/fixtures/write_file_spec.rb", + "test/fixtures/features/step_definitions.rb", + "test/fixtures/hello_world.rb", "test/fixtures/write_file_alternate_spec.rb", "test/fixtures/sync_test.rb", - "test/fixtures/hello_world.rb", - "test/fixtures/features/step_definitions.rb", "test/fixtures/assert_true.rb", - "test/fixtures/slow.rb", - "test/fixtures/write_file_spec.rb", - "test/fixtures/write_file_with_pending_spec.rb", - "test/fixtures/write_file.rb", - "test/message_test.rb", - "test/test_helper.rb", - "test/master_test.rb", "test/runner_test.rb", + "test/sync_test.rb", "test/worker_test.rb" ] From d47f53d8972796c1ee4b456e7bee569914572486 Mon Sep 17 00:00:00 2001 From: Nick Gauthier Date: Thu, 2 Sep 2010 16:33:03 -0500 Subject: [PATCH 3/5] access to master's failed files. proper exit status via rake. --- lib/hydra/master.rb | 5 +++++ lib/hydra/tasks.rb | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/hydra/master.rb b/lib/hydra/master.rb index fdea5de..b160363 100644 --- a/lib/hydra/master.rb +++ b/lib/hydra/master.rb @@ -14,6 +14,7 @@ module Hydra #:nodoc: include Hydra::Messages::Master include Open3 traceable('MASTER') + attr_reader :failed_files # Create a new Master # @@ -54,6 +55,7 @@ module Hydra #:nodoc: @files = Array(opts.fetch('files') { nil }) raise "No files, nothing to do" if @files.empty? @incomplete_files = @files.dup + @failed_files = [] @workers = [] @listeners = [] @event_listeners = Array(opts.fetch('listeners') { nil } ) @@ -116,6 +118,9 @@ module Hydra #:nodoc: @incomplete_files.delete_at(@incomplete_files.index(message.file)) trace "#{@incomplete_files.size} Files Remaining" @event_listeners.each{|l| l.file_end(message.file, message.output) } + unless message.output == '.' + @failed_files << message.file + end if @incomplete_files.empty? @workers.each do |worker| @event_listeners.each{|l| l.worker_end(worker) } diff --git a/lib/hydra/tasks.rb b/lib/hydra/tasks.rb index 5105ec0..09a8299 100644 --- a/lib/hydra/tasks.rb +++ b/lib/hydra/tasks.rb @@ -109,7 +109,10 @@ module Hydra #:nodoc: $stderr.puts %{WARNING: RAILS_ENV is "development". Make sure to set it properly (ex: "RAILS_ENV=test rake hydra")} end - Hydra::Master.new(@opts) + master = Hydra::Master.new(@opts) + unless master.failed_files.empty? + raise "Hydra: Not all tests passes" + end end end end From e77d1a97103b13d943a9d3b262271529c4fab447 Mon Sep 17 00:00:00 2001 From: Nick Gauthier Date: Thu, 2 Sep 2010 16:33:09 -0500 Subject: [PATCH 4/5] Version bump to 0.22.1 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 2157409..a723ece 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.22.0 +0.22.1 From 0e8c80b588711c1d3b12649a0a98b4728e9440ea Mon Sep 17 00:00:00 2001 From: Nick Gauthier Date: Thu, 2 Sep 2010 16:34:03 -0500 Subject: [PATCH 5/5] Version 0.22.1: Proper exit status returned --- hydra.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hydra.gemspec b/hydra.gemspec index e86f3a9..0517003 100644 --- a/hydra.gemspec +++ b/hydra.gemspec @@ -5,7 +5,7 @@ Gem::Specification.new do |s| s.name = %q{hydra} - s.version = "0.22.0" + s.version = "0.22.1" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Nick Gauthier"]