parallelized_specs 0.4.08 → 0.4.09

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -12,7 +12,7 @@ begin
12
12
  gem.email = "jake@instructure.com"
13
13
  gem.homepage = "http://github.com/jakesorce/#{gem.name}"
14
14
  gem.authors = "Jake Sorce, Bryan Madsen, Shawn Meredith"
15
- gem.version = "0.4.08"
15
+ gem.version = "0.4.09"
16
16
  end
17
17
  Jeweler::GemcutterTasks.new
18
18
  rescue LoadError
@@ -293,8 +293,8 @@ class ParallelizedSpecs
293
293
  end
294
294
  end
295
295
 
296
- def self.update_rerun_summary(l, outcome)
297
- File.open(@failure_summary, 'a+') { |f| f.puts("Outcome #{outcome} for #{l}") }
296
+ def self.update_rerun_summary(l, outcome, stack = "")
297
+ File.open(@failure_summary, 'a+') { |f| f.puts("Outcome #{outcome} for #{l}\n #{stack}") }
298
298
  end
299
299
 
300
300
  def self.parse_result(result)
@@ -322,20 +322,22 @@ class ParallelizedSpecs
322
322
  puts content
323
323
  end
324
324
 
325
- def self.abort_reruns(code)
325
+ def self.abort_reruns(code, result = "")
326
326
  case code
327
327
  when code == 1
328
328
  print_failures("#{RAILS_ROOT}/tmp/parallel_log/error.log")
329
329
  abort "SEVERE: shared specs currently are not eligiable for reruns, marking build as a failure"
330
330
  when code == 2
331
- update_rerun_summary(l, "FAILED")
331
+ update_rerun_summary(l, "FAILED", result)
332
332
  print_failures(@failure_summary, "RERUN")
333
333
  abort "SEVERE: spec didn't actually run, ending rerun process early"
334
334
  when code == 3
335
- update_rerun_summary(l, "FAILED")
335
+ update_rerun_summary(l, "FAILED", result)
336
336
  print_failures(@failure_summary, "RERUN")
337
337
  abort "SEVERE: the spec failed to run on the rerun try, marking build as failed"
338
338
  when code == 4
339
+ update_rerun_summary(l, "FAILED", result)
340
+ print_failures(@failure_summary, "RERUN")
339
341
  abort "SEVERE: unexpected outcome on the rerun, marking build as a failure"
340
342
  when code == 5
341
343
  abort "SEVERE: #{@error_count} errors, but the build failed, errors were not written to the file or there is something else wrong, marking build as a failure"
@@ -353,9 +355,9 @@ class ParallelizedSpecs
353
355
  end
354
356
  end
355
357
 
356
- def self.update_failed(l)
358
+ def self.update_failed(l, result)
357
359
  puts "WARNING: the example failed again"
358
- update_rerun_summary(l, "FAILED")
360
+ update_rerun_summary(l, "FAILED", result)
359
361
  @rerun_failures << l
360
362
  end
361
363
 
@@ -366,7 +368,6 @@ class ParallelizedSpecs
366
368
  end
367
369
 
368
370
  def self.pass_reruns()
369
- print_failures("#{RAILS_ROOT}/tmp/parallel_log/error.log")
370
371
  print_failures(@failure_summary, "RERUN")
371
372
  puts "INFO: rerun summary all rerun examples passed, rspec will mark this build as passed"
372
373
  end
@@ -396,20 +397,20 @@ class ParallelizedSpecs
396
397
  @rerun_passes ||= []
397
398
 
398
399
  @rerun_specs.each do |l|
399
- rerun_spec(l)
400
+ result = rerun_spec(l)
400
401
 
401
402
  if @examples == 0 and @failures == 0
402
- abort_reruns(2)
403
+ abort_reruns(2, result)
403
404
  end
404
405
 
405
406
  if @examples == 0 #when specs fail to run it exits with 0 examples, 0 failures and won't be matched by the previous regex
406
- abort_reruns(3)
407
+ abort_reruns(3, result)
407
408
  elsif @failures > 0
408
- update_failed(l)
409
+ update_failed(l, result)
409
410
  elsif @examples > 0 && @failures == 0
410
411
  update_passed(l)
411
412
  else
412
- abort_reruns(4)
413
+ abort_reruns(4, result)
413
414
  end
414
415
  end #end file loop
415
416
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "parallelized_specs"
8
- s.version = "0.4.08"
8
+ s.version = "0.4.09"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jake Sorce, Bryan Madsen, Shawn Meredith"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallelized_specs
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 8
10
- version: 0.4.08
9
+ - 9
10
+ version: 0.4.09
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jake Sorce, Bryan Madsen, Shawn Meredith