Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Pass DRb uri to results

  • Loading branch information...
commit facf5679def32c63539a50b6339d974821af0432 1 parent 93c7102
@brynary authored
View
2  lib/testjour/commands/run.rb
@@ -55,7 +55,7 @@ def queue_features(queue)
def print_results
puts
- puts "Building on #{@found_server} processes..."
+ puts "Requesting build from #{@found_server} processes..."
puts
Cucumber::CLI.executor.wait_for_results
View
8 lib/testjour/cucumber_extensions/drb_formatter.rb
@@ -7,19 +7,19 @@ def initialize(queue_server)
end
def step_passed(step, regexp, args)
- @queue_server.write_result "."
+ @queue_server.write_result DRb.uri, "."
end
def step_failed(step, regexp, args)
- @queue_server.write_result "F", step.error.message, step.error.backtrace
+ @queue_server.write_result DRb.uri, "F", step.error.message, step.error.backtrace
end
def step_pending(step, regexp, args)
- @queue_server.write_result "P"
+ @queue_server.write_result DRb.uri, "P"
end
def step_skipped(step, regexp, args)
- @queue_server.write_result "_"
+ @queue_server.write_result DRb.uri, "_"
end
def method_missing(*args, &block)
View
15 lib/testjour/cucumber_extensions/queueing_executor.rb
@@ -1,6 +1,5 @@
require "testjour/colorer"
-
-require File.expand_path(File.dirname(__FILE__) + "/../../../vendor/progressbar")
+require "testjour/progressbar"
module Testjour
@@ -18,21 +17,22 @@ def initialize(queue_server, step_mother)
@passed = 0
@skipped = 0
@pending = 0
+ @result_uris = []
@errors = []
end
def wait_for_results
- progress_bar = ProgressBar.new("running", step_count)
+ progress_bar = ProgressBar.new("0 slaves", step_count)
step_count.times do
log_result(*@queue_server.take_result)
if failed?
progress_bar.colorer = Testjour::Colorer.method(:failed).to_proc
- progress_bar.title = "#{@errors.size} failed"
+ progress_bar.title = "#{@result_uris.size} slaves, #{@errors.size} failures"
else
progress_bar.colorer = Testjour::Colorer.method(:passed).to_proc
- progress_bar.title = "running"
+ progress_bar.title = "#{@result_uris.size} slaves"
end
progress_bar.inc
@@ -49,7 +49,10 @@ def failed?
end
- def log_result(dot, message, backtrace)
+ def log_result(uri, dot, message, backtrace)
+ @result_uris << uri
+ @result_uris.uniq!
+
case dot
when "."
@passed += 1
View
6 vendor/progressbar.rb → lib/testjour/progressbar.rb
@@ -45,7 +45,7 @@ def eta
else
elapsed = Time.now - @start_time
eta = elapsed * @total / @current - elapsed;
- sprintf("ETA: %s", format_time(eta))
+ sprintf("ETA: %s", format_time(eta))
end
end
@@ -69,8 +69,8 @@ def bar(percentage)
end
def show (percentage)
- output = sprintf("%-14s %3d%% %s %s%s",
- @title[0,13] + ":",
+ output = sprintf("%-25s %3d%% %s %s%s",
+ @title[0,25],
percentage,
bar(percentage),
time,
View
4 lib/testjour/queue_server.rb
@@ -48,8 +48,8 @@ def take_work
end
end
- def write_result(dot, message = nil, backtrace = [])
- @result_queue.push [dot, message.to_s, backtrace.join("\n")]
+ def write_result(uri, dot, message = nil, backtrace = [])
+ @result_queue.push [uri, dot, message.to_s, backtrace.join("\n")]
nil
end
View
4 testjour.gemspec
@@ -6,12 +6,12 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Bryan Helmkamp"]
- s.date = %q{2008-12-08}
+ s.date = %q{2008-12-09}
s.default_executable = %q{testjour}
s.description = %q{Distributed test running with autodiscovery via Bonjour (for Cucumber first)}
s.email = %q{bryan@brynary.com}
s.executables = ["testjour"]
- s.files = ["History.txt", "MIT-LICENSE.txt", "README.rdoc", "Rakefile", "bin/testjour", "lib/testjour", "lib/testjour/bonjour.rb", "lib/testjour/cli.rb", "lib/testjour/colorer.rb", "lib/testjour/commands", "lib/testjour/commands/base_command.rb", "lib/testjour/commands/help.rb", "lib/testjour/commands/list.rb", "lib/testjour/commands/local_run.rb", "lib/testjour/commands/run.rb", "lib/testjour/commands/slave_run.rb", "lib/testjour/commands/slave_start.rb", "lib/testjour/commands/slave_stop.rb", "lib/testjour/commands/slave_warm.rb", "lib/testjour/commands/version.rb", "lib/testjour/commands/warm.rb", "lib/testjour/commands.rb", "lib/testjour/cucumber_extensions", "lib/testjour/cucumber_extensions/drb_formatter.rb", "lib/testjour/cucumber_extensions/queueing_executor.rb", "lib/testjour/mysql.rb", "lib/testjour/pid_file.rb", "lib/testjour/queue_server.rb", "lib/testjour/rsync.rb", "lib/testjour/slave_server.rb", "lib/testjour.rb", "vendor/authprogs", "vendor/progressbar.rb"]
+ s.files = ["History.txt", "MIT-LICENSE.txt", "README.rdoc", "Rakefile", "bin/testjour", "lib/testjour", "lib/testjour/bonjour.rb", "lib/testjour/cli.rb", "lib/testjour/colorer.rb", "lib/testjour/commands", "lib/testjour/commands/base_command.rb", "lib/testjour/commands/help.rb", "lib/testjour/commands/list.rb", "lib/testjour/commands/local_run.rb", "lib/testjour/commands/run.rb", "lib/testjour/commands/slave_run.rb", "lib/testjour/commands/slave_start.rb", "lib/testjour/commands/slave_stop.rb", "lib/testjour/commands/slave_warm.rb", "lib/testjour/commands/version.rb", "lib/testjour/commands/warm.rb", "lib/testjour/commands.rb", "lib/testjour/cucumber_extensions", "lib/testjour/cucumber_extensions/drb_formatter.rb", "lib/testjour/cucumber_extensions/queueing_executor.rb", "lib/testjour/mysql.rb", "lib/testjour/pid_file.rb", "lib/testjour/progressbar.rb", "lib/testjour/queue_server.rb", "lib/testjour/rsync.rb", "lib/testjour/slave_server.rb", "lib/testjour.rb", "vendor/authprogs"]
s.homepage = %q{http://github.com/brynary/testjour}
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.1}
Please sign in to comment.
Something went wrong with that request. Please try again.