parallelized_specs 0.3.56 → 0.3.57

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.3.56"
15
+ gem.version = "0.3.57"
16
16
  end
17
17
  Jeweler::GemcutterTasks.new
18
18
  rescue LoadError
@@ -110,8 +110,14 @@ class ParallelizedSpecs
110
110
  #parse and print results
111
111
  results = find_results(test_results.map { |result| result[:stdout] }*"")
112
112
  puts ""
113
- puts summarize_results(results)
113
+ summary = summarize_results(results)
114
+ puts "#{summary}"
114
115
 
116
+ total_ran_examples = summary.match(/\d*/).to_s
117
+ total_expected_examples = 0
118
+ File.open('tmp/parallel_log/total_specs.txt').each do |line|
119
+ total_expected_examples += line.to_i
120
+ end
115
121
  #report total time taken
116
122
  puts ""
117
123
  puts "Took #{Time.now - start} seconds"
@@ -120,14 +126,15 @@ class ParallelizedSpecs
120
126
  failed = test_results.any? { |result| result[:exit_status] != 0 }
121
127
  puts "entire failed object #{test_result}.to_s"
122
128
  puts "this is the exit status of the threads #{failed}"
123
- if failed && FileTest.exist?("#{RAILS_ROOT}/tmp/parallel_log/rspec.failures")
129
+
130
+ if failed && FileTest.exist?("#{RAILS_ROOT}/tmp/parallel_log/rspec.failures") && total_ran_examples == total_expected_examples
124
131
  puts "this is inside rerun condition"
125
132
  puts "some specs failed, about to start the rerun process\n no more than 9 specs may be rerun and shared specs are not allowed\n...\n..\n."
126
133
  ParallelizedSpecs.rerun()
127
134
  else
128
135
  abort "#{name.capitalize}s Failed" if failed
129
136
  end
130
- puts "marking build as PASSED"
137
+ puts "marking build as PASSED"
131
138
  end
132
139
 
133
140
  # parallel:spec[:count, :pattern, :options]
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "parallelized_specs"
8
- s.version = "0.3.56"
8
+ s.version = "0.3.57"
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: 99
4
+ hash: 97
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 56
10
- version: 0.3.56
9
+ - 57
10
+ version: 0.3.57
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jake Sorce, Bryan Madsen, Shawn Meredith