parallelized_specs 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. data/Gemfile +1 -1
  2. data/Rakefile +2 -2
  3. data/Readme.md +32 -65
  4. data/VERSION +1 -1
  5. data/bin/parallelized_spec +2 -0
  6. data/bin/{parallel_test → parallelized_test} +6 -7
  7. data/lib/{parallel_specs.rb → parallelized_specs.rb} +4 -4
  8. data/lib/{parallel_specs → parallelized_specs}/spec_error_count_logger.rb +2 -2
  9. data/lib/{parallel_specs → parallelized_specs}/spec_error_logger.rb +2 -2
  10. data/lib/{parallel_specs → parallelized_specs}/spec_failures_logger.rb +3 -3
  11. data/lib/{parallel_specs → parallelized_specs}/spec_logger_base.rb +3 -3
  12. data/lib/{parallel_specs → parallelized_specs}/spec_runtime_logger.rb +1 -1
  13. data/lib/{parallel_specs → parallelized_specs}/spec_start_finish_logger.rb +2 -2
  14. data/lib/{parallel_specs → parallelized_specs}/spec_summary_logger.rb +2 -2
  15. data/lib/{parallel_tests.rb → parallelized_tests.rb} +4 -4
  16. data/lib/{parallel_tests → parallelized_tests}/grouper.rb +1 -1
  17. data/lib/{parallel_tests → parallelized_tests}/railtie.rb +2 -2
  18. data/lib/{parallel_tests → parallelized_tests}/runtime_logger.rb +4 -4
  19. data/lib/{parallel_tests → parallelized_tests}/tasks.rb +4 -4
  20. data/lib/tasks/parallelized_tests.rake +1 -0
  21. data/parallelized_specs.gemspec +26 -26
  22. data/spec/integration_spec.rb +3 -4
  23. data/spec/{parallel_specs → parallelized_specs}/spec_failure_logger_spec.rb +8 -8
  24. data/spec/{parallel_specs → parallelized_specs}/spec_runtime_logger_spec.rb +4 -4
  25. data/spec/{parallel_specs → parallelized_specs}/spec_summary_logger_spec.rb +2 -2
  26. data/spec/parallelized_specs_spec.rb +165 -0
  27. data/spec/{parallel_tests → parallelized_tests}/runtime_logger_spec.rb +13 -13
  28. data/spec/{parallel_tests_spec.rb → parallelized_tests_spec.rb} +39 -39
  29. data/spec/spec_helper.rb +1 -1
  30. metadata +29 -29
  31. data/bin/parallel_spec +0 -2
  32. data/lib/tasks/parallel_tests.rake +0 -1
  33. data/spec/parallel_specs_spec.rb +0 -165
data/Gemfile CHANGED
@@ -7,4 +7,4 @@ group :dev do
7
7
  gem 'rspec', '>=2.4'
8
8
  gem 'rake'
9
9
  gem 'jeweler'
10
- end
10
+ end
data/Rakefile CHANGED
@@ -10,9 +10,9 @@ begin
10
10
  gem.name = "parallelized_specs"
11
11
  gem.summary = "Run rspec tests in parallel"
12
12
  gem.email = "jake@instructure.com"
13
- gem.homepage = "http://github.com/jake/#{gem.name}"
13
+ gem.homepage = "http://github.com/jakesorce/#{gem.name}"
14
14
  gem.authors = "Jake Sorce, Bryan Madsen"
15
- gem.version = "0.0.1"
15
+ gem.version = "0.0.2"
16
16
  end
17
17
 
18
18
  Jeweler::GemcutterTasks.new
data/Readme.md CHANGED
@@ -10,11 +10,11 @@ If you use RSpec: ensure you got >= 2.4
10
10
  As gem
11
11
 
12
12
  # add to Gemfile
13
- gem "parallel_tests", :group => :development
13
+ gem "parallelized_specs", :group => :development
14
14
 
15
15
  OR as plugin
16
16
 
17
- rails plugin install git://github.com/grosser/parallel_tests.git
17
+ rails plugin install git://github.com/jakesorce/parallelized_specs.git
18
18
 
19
19
  # add to Gemfile
20
20
  gem "parallel", :group => :development
@@ -24,13 +24,13 @@ OR as plugin
24
24
 
25
25
  As gem
26
26
 
27
- gem install parallel_tests
27
+ gem install parallelized_specs
28
28
 
29
29
  # add to config/environments/development.rb
30
- config.gem "parallel_tests"
30
+ config.gem "parallelized_specs"
31
31
 
32
32
  # add to Rakefile
33
- begin; require 'parallel_tests/tasks'; rescue LoadError; end
33
+ begin; require 'parallelized_specs/tasks'; rescue LoadError; end
34
34
 
35
35
  OR as plugin
36
36
 
@@ -39,10 +39,10 @@ OR as plugin
39
39
  # add to config/environments/development.rb
40
40
  config.gem "parallel"
41
41
 
42
- ./script/plugin install git://github.com/grosser/parallel_tests.git
42
+ ./script/plugin install git://github.com/jakesorce/parallelized_specs.git
43
43
 
44
44
  ## Setup
45
- ParallelTests uses 1 database per test-process, 2 processes will use `*_test` and `*_test2`.
45
+ ParallelizedSpecs uses 1 database per test-process, 2 processes will use `*_test` and `*_test2`.
46
46
 
47
47
 
48
48
  ### 1: Add to `config/database.yml`
@@ -89,19 +89,19 @@ Even process runtimes
89
89
 
90
90
  Log test runtime to give each process the same runtime.
91
91
 
92
- Rspec: Add to your `spec/parallel_spec.opts` (or `spec/spec.opts`) :
92
+ Rspec: Add to your `spec/parallelized_specs.opts` (or `spec/spec.opts`) :
93
93
 
94
94
  RSpec 1.x:
95
95
  --format progress
96
- --require parallel_specs/spec_runtime_logger
97
- --format ParallelSpecs::SpecRuntimeLogger:tmp/parallel_profile.log
96
+ --require parallelized_specs/spec_runtime_logger
97
+ --format ParallelizedSpecs::SpecRuntimeLogger:tmp/parallel_profile.log
98
98
  RSpec >= 2.4:
99
- If installed as plugin: -I vendor/plugins/parallel_tests/lib
99
+ If installed as plugin: -I vendor/plugins/parallelized_specs/lib
100
100
  --format progress
101
- --format ParallelSpecs::SpecRuntimeLogger --out tmp/parallel_profile.log
101
+ --format ParallelizedSpecs::SpecRuntimeLogger --out tmp/parallel_profile.log
102
102
 
103
103
  Test::Unit: Add to your `test_helper.rb`:
104
- require 'parallel_tests/runtime_logger'
104
+ require 'parallelized_specs/runtime_logger'
105
105
 
106
106
 
107
107
  SpecSummaryLogger
@@ -113,12 +113,12 @@ Add the following to your `spec/parallel_spec.opts` (or `spec/spec.opts`) :
113
113
 
114
114
  RSpec 1.x:
115
115
  --format progress
116
- --require parallel_specs/spec_summary_logger
117
- --format ParallelSpecs::SpecSummaryLogger:tmp/spec_summary.log
116
+ --require parallelized_specs/spec_summary_logger
117
+ --format ParallelizedSpecs::SpecSummaryLogger:tmp/spec_summary.log
118
118
  RSpec >= 2.2:
119
- If installed as plugin: -I vendor/plugins/parallel_tests/lib
119
+ If installed as plugin: -I vendor/plugins/parallelized_specs/lib
120
120
  --format progress
121
- --format ParallelSpecs::SpecSummaryLogger --out tmp/spec_summary.log
121
+ --format ParallelizedSpecs::SpecSummaryLogger --out tmp/spec_summary.log
122
122
 
123
123
  SpecFailuresLogger
124
124
  -----------------------
@@ -129,27 +129,27 @@ E.g.
129
129
 
130
130
  rspec /path/to/my_spec.rb:123 # should do something
131
131
 
132
- Add the following to your `spec/parallel_spec.opts` (or `spec/spec.opts`) :
132
+ Add the following to your `spec/parallelized_spec.opts` (or `spec/spec.opts`) :
133
133
 
134
134
  RSpec 1.x:
135
135
  --format progress
136
- --require parallel_specs/spec_failures_logger
137
- --format ParallelSpecs::SpecFailuresLogger:tmp/failing_specs.log
136
+ --require parallelized_specs/spec_failures_logger
137
+ --format ParallelizedSpecs::SpecFailuresLogger:tmp/failing_specs.log
138
138
  RSpec >= 2.4:
139
- If installed as plugin: -I vendor/plugins/parallel_tests/lib
139
+ If installed as plugin: -I vendor/plugins/parallelized_specs/lib
140
140
  --format progress
141
- --format ParallelSpecs::SpecFailuresLogger --out tmp/failing_specs.log
141
+ --format ParallelizedSpecs::SpecFailuresLogger --out tmp/failing_specs.log
142
142
 
143
143
  Setup for non-rails
144
144
  ===================
145
- sudo gem install parallel_tests
145
+ sudo gem install parallelized_specs
146
146
  # go to your project dir
147
- parallel_test OR parallel_spec OR parallel_cucumber
147
+ parallelized_specs
148
148
  # [Optional] use ENV['TEST_ENV_NUMBER'] inside your tests to select separate db/memcache/etc.
149
149
 
150
150
  [optional] Only run selected files & folders:
151
151
 
152
- parallel_test test/bar test/baz/xxx_text.rb
152
+ parallelized_specs test/bar test/baz/xxx_text_spec.rb
153
153
 
154
154
  Options are:
155
155
 
@@ -182,7 +182,6 @@ You can run any kind of code with -e / --execute
182
182
 
183
183
  TIPS
184
184
  ====
185
- - [Capybara + Selenium] add to env.rb: `Capybara.server_port = 8888 + ENV['TEST_ENV_NUMBER'].to_i`
186
185
  - [RSpec] add a `spec/parallel_spec.opts` to use different options, e.g. no --drb (default: `spec/spec.opts`)
187
186
  - [RSpec] if something looks fishy try to delete `script/spec`
188
187
  - [RSpec] if `script/spec` is missing parallel:spec uses just `spec` (which solves some issues with double-loaded environment.rb)
@@ -190,51 +189,19 @@ TIPS
190
189
  - [RSpec] `./script/generate rspec` if you are running rspec from gems (this plugin uses script/spec which may fail if rspec files are outdated)
191
190
  - [RSpec] remove --loadby from you spec/*.opts
192
191
  - [Bundler] if you have a `Gemfile` then `bundle exec` will be used to run tests
193
- - [Capybara setup](https://github.com/grosser/parallel_tests/wiki)
194
- - [Sphinx setup](https://github.com/grosser/parallel_tests/wiki)
195
- - [Capistrano setup](https://github.com/grosser/parallel_tests/wiki/Remotely-with-capistrano) let your tests run on a big box instead of your laptop
196
192
  - [SQL schema format] use :ruby schema format to get faster parallel:prepare`
197
193
  - [ActiveRecord] if you do not have `db:abort_if_pending_migrations` add this to your Rakefile: `task('db:abort_if_pending_migrations'){}`
198
- - `export PARALLEL_TEST_PROCESSORS=X` in your environment and parallel_tests will use this number of processors by default
194
+ - `export PARALLEL_TEST_PROCESSORS=X` in your environment and parallelized_specs will use this number of processors by default
199
195
  - with zsh this would be `rake "parallel:prepare[3]"`
200
196
 
201
- TODO
202
- ====
203
- - make jRuby compatible [basics](http://yehudakatz.com/2009/07/01/new-rails-isolation-testing/)
204
- - make windows compatible
205
-
206
197
  Authors
207
198
  ====
208
199
  inspired by [pivotal labs](http://pivotallabs.com/users/miked/blog/articles/849-parallelize-your-rspec-suite)
209
200
 
210
- ### [Contributors](http://github.com/grosser/parallel_tests/contributors)
211
- - [Charles Finkel](http://charlesfinkel.com/)
212
- - [Indrek Juhkam](http://urgas.eu)
213
- - [Jason Morrison](http://jayunit.net)
214
- - [jinzhu](http://github.com/jinzhu)
215
- - [Joakim Kolsjö](http://www.rubyblocks.se)
216
- - [Kevin Scaldeferri](http://kevin.scaldeferri.com/blog/)
217
- - [Kpumuk](http://kpumuk.info/)
218
- - [Maksim Horbul](http://github.com/mhorbul)
219
- - [Pivotal Labs](http://www.pivotallabs.com)
220
- - [Rohan Deshpande](http://github.com/rdeshpande)
221
- - [Tchandy](http://thiagopradi.net/)
222
- - [Terence Lee](http://hone.heroku.com/)
223
- - [Will Bryant](http://willbryant.net/)
224
- - [Fred Wu](http://fredwu.me)
225
- - [xxx](https://github.com/xxx)
226
- - [Levent Ali](http://purebreeze.com/)
227
- - [Michael Kintzer](https://github.com/rockrep)
228
- - [nathansobo](https://github.com/nathansobo)
229
- - [Joe Yates](http://titusd.co.uk)
230
- - [asmega](http://www.ph-lee.com)
231
- - [Doug Barth](https://github.com/dougbarth)
232
- - [Geoffrey Hichborn](https://github.com/phene)
233
- - [Trae Robrock](https://github.com/trobrock)
234
- - [Lawrence Wang](https://github.com/levity)
235
- - [Sean Walbran](https://github.com/seanwalbran)
236
-
237
- [Michael Grosser](http://grosser.it)<br/>
238
- michael@grosser.it<br/>
201
+ based loosely from https://github.com/grosser/parallel_tests
202
+ ### [Contributors](http://github.com/jakesorce/parallelized_specs/contributors)
203
+ - [Bryan Madsen](http://github.com/bmad)
204
+
205
+ [Jake Sorce](http://github.com/jakesorce)<br/>
239
206
  Hereby placed under public domain, do what you want, just do not hold me accountable...<br/>
240
- [![Flattr](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=grosser&url=https://github.com/grosser/parallel_tests&title=parallel_tests&language=en_GB&tags=github&category=software)
207
+ [![Flattr](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=jakesorce&url=https://github.com/jakesorce/parallelized_specs&title=parallelized_specs&language=en_GB&tags=github&category=software)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env ruby
2
+ exec "#{File.join(File.dirname(__FILE__), 'parallelized_test')} -t spec #{ARGV * ' '}"
@@ -4,7 +4,7 @@ require 'optparse'
4
4
  require 'parallel'
5
5
  raise "please ' gem install parallel '" if Gem::Version.new(Parallel::VERSION) < Gem::Version.new('0.4.2')
6
6
  $LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
7
- require "parallel_tests"
7
+ require "parallelized_tests"
8
8
 
9
9
  options = {}
10
10
  OptionParser.new do |opts|
@@ -30,7 +30,7 @@ BANNER
30
30
  opts.on("-t", "--type [TYPE]", "which type of tests to run? test, spec or features"){|type| options[:type] = type }
31
31
  opts.on("--non-parallel", "execute same commands but do not in parallel, needs --exec"){ options[:non_parallel] = true }
32
32
  opts.on("--chunk-timeout [TIMEOUT]", "timeout before re-printing the output of a child-process"){|timeout| options[:chunk_timeout] = timeout.to_f }
33
- opts.on('-v', '--version', 'Show Version'){ puts ParallelTests::VERSION; exit}
33
+ opts.on('-v', '--version', 'Show Version'){ puts ParallelizedTests::VERSION; exit}
34
34
  opts.on("-h", "--help", "Show this.") { puts opts; exit }
35
35
  end.parse!
36
36
 
@@ -46,11 +46,11 @@ if options[:execute]
46
46
  runs = (0...num_processes).to_a
47
47
  results = if options[:non_parallel]
48
48
  runs.map do |i|
49
- ParallelTests.execute_command(options[:execute], i, options)
49
+ ParallelizedTests.execute_command(options[:execute], i, options)
50
50
  end
51
51
  else
52
52
  Parallel.map(runs, :in_processes => num_processes) do |i|
53
- ParallelTests.execute_command(options[:execute], i, options)
53
+ ParallelizedTests.execute_command(options[:execute], i, options)
54
54
  end
55
55
  end.flatten
56
56
  abort if results.any?{|r| r[:exit_status] != 0 }
@@ -58,11 +58,10 @@ else
58
58
  lib, name, task = {
59
59
  'test' => ["tests", "test", "test"],
60
60
  'spec' => ["specs", "spec", "spec"],
61
- 'features' => ["cucumber", "feature", "features"]
62
61
  }[options[:type]||'test']
63
62
 
64
- require "parallel_#{lib}"
65
- klass = eval("Parallel#{lib.capitalize}")
63
+ require "parallelized_#{lib}"
64
+ klass = eval("Parallelized#{lib.capitalize}")
66
65
 
67
66
  start = Time.now
68
67
 
@@ -1,6 +1,6 @@
1
- require 'parallel_tests'
1
+ require 'parallelized_tests'
2
2
 
3
- class ParallelSpecs < ParallelTests
3
+ class ParallelizedSpecs < ParallelizedTests
4
4
  def self.run_tests(test_files, process_number, options)
5
5
  exe = executable # expensive, so we cache
6
6
  version = (exe =~ /\brspec\b/ ? 2 : 1)
@@ -22,7 +22,7 @@ class ParallelSpecs < ParallelTests
22
22
 
23
23
  # legacy <-> people log to this file using rspec options
24
24
  def self.runtime_log
25
- 'tmp/parallel_profile.log'
25
+ 'tmp/parallelized_profile.log'
26
26
  end
27
27
 
28
28
  protected
@@ -41,7 +41,7 @@ class ParallelSpecs < ParallelTests
41
41
  end
42
42
 
43
43
  def self.spec_opts(rspec_version)
44
- options_file = ['spec/parallel_spec.opts', 'spec/spec.opts'].detect{|f| File.file?(f) }
44
+ options_file = ['spec/parallelized_spec.opts', 'spec/spec.opts'].detect{|f| File.file?(f) }
45
45
  return unless options_file
46
46
  "-O #{options_file}"
47
47
  end
@@ -1,7 +1,7 @@
1
- require 'parallel_specs'
1
+ require 'parallelized_specs'
2
2
  require File.join(File.dirname(__FILE__), 'spec_logger_base')
3
3
 
4
- class ParallelSpecs::SpecErrorCountLogger < ParallelSpecs::SpecLoggerBase
4
+ class ParallelizedSpecs::SpecErrorCountLogger < ParallelizedSpecs::SpecLoggerBase
5
5
  def initialize(options, output=nil)
6
6
  super
7
7
  @passed_examples = []
@@ -1,7 +1,7 @@
1
- require 'parallel_specs'
1
+ require 'parallelized_specs'
2
2
  require File.join(File.dirname(__FILE__), 'spec_logger_base')
3
3
 
4
- class ParallelSpecs::SpecErrorLogger < ParallelSpecs::SpecLoggerBase
4
+ class ParallelizedSpecs::SpecErrorLogger < ParallelizedSpecs::SpecLoggerBase
5
5
  def initialize(options, output=nil)
6
6
  super
7
7
  @passed_examples = []
@@ -1,6 +1,6 @@
1
- require 'parallel_specs/spec_logger_base'
1
+ require 'parallelized_specs/spec_logger_base'
2
2
 
3
- class ParallelSpecs::SpecFailuresLogger < ParallelSpecs::SpecLoggerBase
3
+ class ParallelizedSpecs::SpecFailuresLogger < ParallelizedSpecs::SpecLoggerBase
4
4
  # RSpec 1: does not keep track of failures, so we do
5
5
  def example_failed(example, *args)
6
6
  if RSPEC_1
@@ -37,7 +37,7 @@ class ParallelSpecs::SpecFailuresLogger < ParallelSpecs::SpecLoggerBase
37
37
  file, line = example.location.to_s.split(':')
38
38
  next unless file and line
39
39
  file.gsub!(%r(^.*?/spec/), './spec/')
40
- @output.puts "#{ParallelSpecs.executable} #{file}:#{line} # #{example.description}"
40
+ @output.puts "#{ParallelizedSpecs.executable} #{file}:#{line} # #{example.description}"
41
41
  end
42
42
  end
43
43
  end
@@ -1,4 +1,4 @@
1
- require 'parallel_specs'
1
+ require 'parallelized_specs'
2
2
 
3
3
  begin
4
4
  require 'rspec/core/formatters/base_text_formatter'
@@ -7,9 +7,9 @@ rescue LoadError
7
7
  require 'spec/runner/formatter/base_text_formatter'
8
8
  base = Spec::Runner::Formatter::BaseTextFormatter
9
9
  end
10
- ParallelSpecs::SpecLoggerBaseBase = base
10
+ ParallelizedSpecs::SpecLoggerBaseBase = base
11
11
 
12
- class ParallelSpecs::SpecLoggerBase < ParallelSpecs::SpecLoggerBaseBase
12
+ class ParallelizedSpecs::SpecLoggerBase < ParallelizedSpecs::SpecLoggerBaseBase
13
13
  RSPEC_1 = !defined?(RSpec::Core::Formatters::BaseTextFormatter) # do not test for Spec, this will trigger deprecation warning in rspec 2
14
14
 
15
15
  def initialize(*args)
@@ -1,6 +1,6 @@
1
1
  require 'parallel_specs/spec_logger_base'
2
2
 
3
- class ParallelSpecs::SpecRuntimeLogger < ParallelSpecs::SpecLoggerBase
3
+ class ParallelizedSpecs::SpecRuntimeLogger < ParallelizedSpecs::SpecLoggerBase
4
4
  def initialize(*args)
5
5
  super
6
6
  @example_times = Hash.new(0)
@@ -1,7 +1,7 @@
1
- require 'parallel_specs'
1
+ require 'parallelized_specs'
2
2
  require File.join(File.dirname(__FILE__), 'spec_logger_base')
3
3
 
4
- class ParallelSpecs::SpecStartFinishLogger < ParallelSpecs::SpecLoggerBase
4
+ class ParallelizedSpecs::SpecStartFinishLogger < ParallelizedSpecs::SpecLoggerBase
5
5
  def initialize(options, output=nil)
6
6
  output ||= options # rspec 2 has output as first argument
7
7
 
@@ -1,6 +1,6 @@
1
- require 'parallel_specs/spec_failures_logger'
1
+ require 'parallelized_specs/spec_failures_logger'
2
2
 
3
- class ParallelSpecs::SpecSummaryLogger < ParallelSpecs::SpecLoggerBase
3
+ class ParallelizedSpecs::SpecSummaryLogger < ParallelizedSpecs::SpecLoggerBase
4
4
  # RSpec 1: dumps 1 failed spec
5
5
  def dump_failure(*args)
6
6
  lock_output do
@@ -1,8 +1,8 @@
1
1
  require 'parallel'
2
- require 'parallel_tests/grouper'
3
- require 'parallel_tests/railtie'
2
+ require 'parallelized_tests/grouper'
3
+ require 'parallelized_tests/railtie'
4
4
 
5
- class ParallelTests
5
+ class ParallelizedTests
6
6
  VERSION = File.read( File.join(File.dirname(__FILE__),'..','VERSION') ).strip
7
7
 
8
8
  # parallel:spec[:count, :pattern, :options]
@@ -62,7 +62,7 @@ class ParallelTests
62
62
  end
63
63
 
64
64
  def self.runtime_log
65
- 'tmp/parallel_runtime_test.log'
65
+ 'tmp/parallelized_runtime_test.log'
66
66
  end
67
67
 
68
68
  def self.summarize_results(results)
@@ -1,4 +1,4 @@
1
- class ParallelTests
1
+ class ParallelizedTests
2
2
  class Grouper
3
3
  def self.in_groups(items, num_groups)
4
4
  groups = Array.new(num_groups){ [] }
@@ -1,9 +1,9 @@
1
1
  # add rake tasks if we are inside Rails
2
2
  if defined?(Rails::Railtie)
3
- class ParallelTests
3
+ class ParallelizedTests
4
4
  class Railtie < ::Rails::Railtie
5
5
  rake_tasks do
6
- load File.expand_path("../../tasks/parallel_tests.rake", __FILE__)
6
+ load File.expand_path("../../tasks/parallelized_tests.rake.rake", __FILE__)
7
7
  end
8
8
  end
9
9
  end
@@ -1,15 +1,15 @@
1
- class ParallelTests::RuntimeLogger
1
+ class ParallelizedTests::RuntimeLogger
2
2
  @@has_started = false
3
3
 
4
4
  def self.log(test, start_time, end_time)
5
5
  return if test.is_a? Test::Unit::TestSuite # don't log for suites-of-suites
6
6
 
7
7
  if !@@has_started # make empty log file
8
- File.open(ParallelTests.runtime_log, 'w') do end
8
+ File.open(ParallelizedTests.runtime_log, 'w') do end
9
9
  @@has_started = true
10
10
  end
11
11
 
12
- File.open(ParallelTests.runtime_log, 'a') do |output|
12
+ File.open(ParallelizedTests.runtime_log, 'a') do |output|
13
13
  begin
14
14
  output.flock File::LOCK_EX
15
15
  output.puts(self.message(test, start_time, end_time))
@@ -71,7 +71,7 @@ class Test::Unit::TestSuite
71
71
  start_time=Time.now
72
72
  run_without_timing(result, &progress_block)
73
73
  end_time=Time.now
74
- ParallelTests::RuntimeLogger.log(self.tests.first, start_time, end_time)
74
+ ParallelizedTests::RuntimeLogger.log(self.tests.first, start_time, end_time)
75
75
  end
76
76
  @@timing_installed = true
77
77