parallelized_specs 0.4.48 → 0.4.49
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 +1 -1
- data/lib/parallelized_specs.rb +18 -16
- data/parallelized_specs.gemspec +1 -1
- metadata +3 -3
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.
|
15
|
+
gem.version = "0.4.49"
|
16
16
|
end
|
17
17
|
Jeweler::GemcutterTasks.new
|
18
18
|
rescue LoadError
|
data/lib/parallelized_specs.rb
CHANGED
@@ -87,6 +87,7 @@ class ParallelizedSpecs
|
|
87
87
|
formatters = formatters_setup
|
88
88
|
@outcome_builder_enabled = formatters.any? { |formatter| formatter.match(/OutcomeBuilder/) }
|
89
89
|
@reruns_enabled = formatters.any? { |formatter| formatter.match(/FailuresFormatter/) }
|
90
|
+
@slow_specs_enabled = formatters.any? { |formatter| formatter.match(/SlowestSpecLogger/) }
|
90
91
|
num_processes = options[:count] || Parallel.processor_count
|
91
92
|
name = 'spec'
|
92
93
|
|
@@ -111,32 +112,33 @@ class ParallelizedSpecs
|
|
111
112
|
run_tests(group, groups.index(group), options)
|
112
113
|
end
|
113
114
|
failed = test_results.any? { |result| result[:exit_status] != 0 } #ruby 1.8.7 works breaks on 1.9.3
|
114
|
-
slowest_spec_determination("#{Rails.root}/tmp/parallel_log/slowest_specs.log")
|
115
|
+
slowest_spec_determination("#{Rails.root}/tmp/parallel_log/slowest_specs.log") if @slow_specs_enabled
|
115
116
|
|
116
117
|
#determines if any tricky conditions happened that can cause false positives and offers logging into what was the last spec to start or finishing running
|
118
|
+
results = find_results(test_results.map { |result| result[:stdout] }*"")
|
119
|
+
@outcome_builder_enabled ? spec_summary = calculate_total_spec_details : spec_summary = summarize_results(results)
|
120
|
+
|
117
121
|
if @outcome_builder_enabled
|
118
122
|
puts "INFO: OutcomeBuilder is enabled now checking for false positives"
|
119
|
-
spec_summary = calculate_total_spec_details
|
120
123
|
puts "INFO: Total specs run #{spec_summary[0]} failed specs #{spec_summary[1]} pending specs #{spec_summary[2]}\n INFO: Took #{Time.now - start} seconds"
|
121
124
|
false_positive_sniffer(num_processes)
|
125
|
+
if @reruns_enabled
|
126
|
+
puts "INFO: RERUNS are enabled"
|
127
|
+
rerun_initializer(name, failed, spec_summary)
|
128
|
+
else
|
129
|
+
abort("SEVERE: #{name.capitalize}s Failed") if failed || spec_summary[2].to_i != 0
|
130
|
+
end
|
122
131
|
else
|
123
|
-
puts "
|
124
|
-
|
125
|
-
puts summarize_results(results)
|
132
|
+
puts "WARNING: OutcomeBuilder is disabled not checking for false positives its likely things like thread failures and rspec non 0 exit codes will cause false positives"
|
133
|
+
puts spec_summary
|
126
134
|
puts "INFO: Took #{Time.now - start} seconds"
|
127
|
-
end
|
128
|
-
|
129
|
-
if @reruns_enabled
|
130
|
-
puts "INFO: RERUNS are enabled starting the rerun process"
|
131
|
-
rerun_initializer(name, failed)
|
132
|
-
else
|
133
135
|
abort("SEVERE: #{name.capitalize}s Failed") if failed
|
134
136
|
end
|
135
137
|
puts "INFO: marking build as PASSED"
|
136
138
|
end
|
137
139
|
|
138
140
|
def self.calculate_total_spec_details
|
139
|
-
spec_total_details = [0,0,0]
|
141
|
+
spec_total_details = [0, 0, 0]
|
140
142
|
File.open("#{Rails.root}/tmp/parallel_log/total_specs.txt").each_line do |count|
|
141
143
|
thread_spec_details = count.split("*")
|
142
144
|
spec_total_details[0] += thread_spec_details[0].to_i
|
@@ -178,13 +180,13 @@ class ParallelizedSpecs
|
|
178
180
|
end
|
179
181
|
end
|
180
182
|
|
181
|
-
def self.rerun_initializer(name, failed)
|
182
|
-
if !File.zero?("#{Rails.root}/tmp/parallel_log/rspec.failures") # works on both 1.8.7\1.9.3
|
183
|
-
puts "INFO: some specs failed, about to start the rerun process\n
|
183
|
+
def self.rerun_initializer(name, failed, spec_summary)
|
184
|
+
if spec_summary[2].to_i != 0 && !File.zero?("#{Rails.root}/tmp/parallel_log/rspec.failures") # works on both 1.8.7\1.9.3
|
185
|
+
puts "INFO: some specs failed, about to start the rerun process\n...\n..\n."
|
184
186
|
ParallelizedSpecs.rerun()
|
185
187
|
else
|
186
188
|
#works on both 1.8.7\1.9.3
|
187
|
-
abort "SEVERE: #{name.capitalize}s Failed" if
|
189
|
+
abort "SEVERE: #{name.capitalize}s Failed" if spec_summary[2].to_i != 0 || failed
|
188
190
|
end
|
189
191
|
end
|
190
192
|
|
data/parallelized_specs.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "parallelized_specs"
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.49"
|
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:
|
4
|
+
hash: 109
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 49
|
10
|
+
version: 0.4.49
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jake Sorce, Bryan Madsen, Shawn Meredith
|