cucumber 0.8.5 and warmsnake (experimental)
This commit is contained in:
parent
cc23eb35c4
commit
d4f1bf59d2
2
Rakefile
2
Rakefile
|
@ -12,7 +12,7 @@ begin
|
|||
gem.authors = ["Nick Gauthier"]
|
||||
gem.add_development_dependency "shoulda", "= 2.10.3"
|
||||
gem.add_development_dependency "rspec", "= 1.3.0"
|
||||
gem.add_development_dependency "cucumber", "= 0.7.2"
|
||||
gem.add_development_dependency "cucumber", "= 0.8.5"
|
||||
gem.add_development_dependency "therubyracer", "= 0.7.4"
|
||||
end
|
||||
Jeweler::GemcutterTasks.new
|
||||
|
|
112
bin/warmsnake.rb
112
bin/warmsnake.rb
|
@ -1,62 +1,64 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
require 'rubygems'
|
||||
require 'hydra'
|
||||
|
||||
@files = ARGV.inject([]){|memo,f| memo += Dir.glob f}
|
||||
|
||||
if @files.empty?
|
||||
puts "You must specify a list of files to run"
|
||||
puts "If you specify a pattern, it must be in quotes"
|
||||
puts %{USAGE: #{$0} test/unit/my_test.rb "test/functional/**/*_test.rb"}
|
||||
exit(1)
|
||||
end
|
||||
|
||||
Signal.trap("TERM", "KILL") do
|
||||
puts "Warm Snake says bye bye"
|
||||
exit(0)
|
||||
end
|
||||
|
||||
bold_yellow = "\033[1;33m"
|
||||
reset = "\033[0m"
|
||||
|
||||
|
||||
loop do
|
||||
env_proc = Process.fork do
|
||||
puts "#{bold_yellow}Booting Environment#{reset}"
|
||||
start = Time.now
|
||||
ENV['RAILS_ENV']='test'
|
||||
require 'config/environment'
|
||||
require 'test/test_helper'
|
||||
finish = Time.now
|
||||
puts "#{bold_yellow}Environment Booted (#{finish-start})#{reset}"
|
||||
|
||||
loop do
|
||||
puts "#{bold_yellow}Running#{reset} [#{@files.inspect}]"
|
||||
if File.expand_path($0) == File.expand_path(__FILE__)
|
||||
require 'rubygems'
|
||||
require 'hydra'
|
||||
|
||||
@files = ARGV.inject([]){|memo,f| memo += Dir.glob f}
|
||||
|
||||
if @files.empty?
|
||||
puts "You must specify a list of files to run"
|
||||
puts "If you specify a pattern, it must be in quotes"
|
||||
puts %{USAGE: #{$0} test/unit/my_test.rb "test/functional/**/*_test.rb"}
|
||||
exit(1)
|
||||
end
|
||||
|
||||
Signal.trap("TERM", "KILL") do
|
||||
puts "Warm Snake says bye bye"
|
||||
exit(0)
|
||||
end
|
||||
|
||||
bold_yellow = "\033[1;33m"
|
||||
reset = "\033[0m"
|
||||
|
||||
|
||||
loop do
|
||||
env_proc = Process.fork do
|
||||
puts "#{bold_yellow}Booting Environment#{reset}"
|
||||
start = Time.now
|
||||
Hydra::Master.new(
|
||||
:files => @files.dup,
|
||||
:listeners => Hydra::Listener::ProgressBar.new(STDOUT),
|
||||
:workers => [{:type => :local, :runners => 4}]
|
||||
)
|
||||
ENV['RAILS_ENV']='test'
|
||||
require 'config/environment'
|
||||
require 'test/test_helper'
|
||||
finish = Time.now
|
||||
puts "#{bold_yellow}Tests finished#{reset} (#{finish-start})"
|
||||
|
||||
puts ""
|
||||
|
||||
$stdout.write "Press #{bold_yellow}ENTER#{reset} to retest. Type #{bold_yellow}r#{reset} then hit enter to reboot environment. #{bold_yellow}CTRL-C#{reset} to quit\n> "
|
||||
begin
|
||||
command = $stdin.gets
|
||||
rescue Interrupt
|
||||
exit(0)
|
||||
puts "#{bold_yellow}Environment Booted (#{finish-start})#{reset}"
|
||||
|
||||
loop do
|
||||
puts "#{bold_yellow}Running#{reset} [#{@files.inspect}]"
|
||||
start = Time.now
|
||||
Hydra::Master.new(
|
||||
:files => @files.dup,
|
||||
:listeners => Hydra::Listener::ProgressBar.new(STDOUT),
|
||||
:workers => [{:type => :local, :runners => 4}]
|
||||
)
|
||||
finish = Time.now
|
||||
puts "#{bold_yellow}Tests finished#{reset} (#{finish-start})"
|
||||
|
||||
puts ""
|
||||
|
||||
$stdout.write "Press #{bold_yellow}ENTER#{reset} to retest. Type #{bold_yellow}r#{reset} then hit enter to reboot environment. #{bold_yellow}CTRL-C#{reset} to quit\n> "
|
||||
begin
|
||||
command = $stdin.gets
|
||||
rescue Interrupt
|
||||
exit(0)
|
||||
end
|
||||
break if !command.nil? and command.chomp == "r"
|
||||
end
|
||||
break if !command.nil? and command.chomp == "r"
|
||||
end
|
||||
begin
|
||||
Process.wait env_proc
|
||||
rescue Interrupt
|
||||
puts "\n#{bold_yellow}SSsssSsssSSssSs#{reset}"
|
||||
break
|
||||
end
|
||||
end
|
||||
begin
|
||||
Process.wait env_proc
|
||||
rescue Interrupt
|
||||
puts "\n#{bold_yellow}SSsssSsssSSssSs#{reset}"
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -9,9 +9,11 @@ Gem::Specification.new do |s|
|
|||
|
||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||
s.authors = ["Nick Gauthier"]
|
||||
s.date = %q{2010-07-08}
|
||||
s.date = %q{2010-08-20}
|
||||
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}
|
||||
s.executables = ["warmsnake.rb"]
|
||||
s.extra_rdoc_files = [
|
||||
"LICENSE",
|
||||
"README.rdoc",
|
||||
|
@ -25,6 +27,7 @@ Gem::Specification.new do |s|
|
|||
"Rakefile",
|
||||
"TODO",
|
||||
"VERSION",
|
||||
"bin/warmsnake.rb",
|
||||
"caliper.yml",
|
||||
"hydra-icon-64x64.png",
|
||||
"hydra.gemspec",
|
||||
|
@ -110,18 +113,18 @@ Gem::Specification.new do |s|
|
|||
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
||||
s.add_development_dependency(%q<shoulda>, ["= 2.10.3"])
|
||||
s.add_development_dependency(%q<rspec>, ["= 1.3.0"])
|
||||
s.add_development_dependency(%q<cucumber>, ["= 0.7.2"])
|
||||
s.add_development_dependency(%q<cucumber>, ["= 0.8.5"])
|
||||
s.add_development_dependency(%q<therubyracer>, ["= 0.7.4"])
|
||||
else
|
||||
s.add_dependency(%q<shoulda>, ["= 2.10.3"])
|
||||
s.add_dependency(%q<rspec>, ["= 1.3.0"])
|
||||
s.add_dependency(%q<cucumber>, ["= 0.7.2"])
|
||||
s.add_dependency(%q<cucumber>, ["= 0.8.5"])
|
||||
s.add_dependency(%q<therubyracer>, ["= 0.7.4"])
|
||||
end
|
||||
else
|
||||
s.add_dependency(%q<shoulda>, ["= 2.10.3"])
|
||||
s.add_dependency(%q<rspec>, ["= 1.3.0"])
|
||||
s.add_dependency(%q<cucumber>, ["= 0.7.2"])
|
||||
s.add_dependency(%q<cucumber>, ["= 0.8.5"])
|
||||
s.add_dependency(%q<therubyracer>, ["= 0.7.4"])
|
||||
end
|
||||
end
|
||||
|
|
|
@ -19,7 +19,6 @@ module Cucumber #:nodoc:
|
|||
print_steps(:failed)
|
||||
print_snippets(@options)
|
||||
print_passing_wip(@options)
|
||||
print_tag_limit_warnings(features)
|
||||
end
|
||||
|
||||
# Removed all progress output
|
||||
|
|
Loading…
Reference in New Issue