parallelized_specs 0.3.79 → 0.3.80
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.
|
15
|
+
gem.version = "0.3.80"
|
16
16
|
end
|
17
17
|
Jeweler::GemcutterTasks.new
|
18
18
|
rescue LoadError
|
@@ -27,7 +27,7 @@ module RSpec
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def retry_command(example)
|
30
|
-
spec_file = example_group.location.gsub("\"", "\\\"").match(/
|
30
|
+
spec_file = example_group.location.gsub("\"", "\\\"").match(/\/.*rb/).to_s
|
31
31
|
spec_name = example.description
|
32
32
|
"SPEC=#{Dir.pwd}/#{spec_file} SPEC_OPTS='-e \"#{spec_name}\"'"
|
33
33
|
end
|
@@ -19,9 +19,9 @@ module RSpec
|
|
19
19
|
env_test_number = 1 if ENV['TEST_ENV_NUMBER'].blank?
|
20
20
|
spec_file = "tmp/parallel_log/spec_count/total_specs#{env_test_number}.txt"
|
21
21
|
failure_file = "tmp/parallel_log/failed_specs/failed_specs#{env_test_number}.txt"
|
22
|
-
|
23
|
-
puts "Expected example count = #{
|
24
|
-
File.delete(spec_file) if
|
22
|
+
expected_example_count = File.open(spec_file, &:readline).to_s
|
23
|
+
puts "Expected example count = #{expected_example_count} from rspec example count = #{example_count}"
|
24
|
+
File.delete(spec_file) if expected_example_count.to_i - example_count.to_i < 2
|
25
25
|
puts "Thread example failure count = #{failure_count}"
|
26
26
|
failure_count > 0 ? (File.open(failure_file, 'a+') { |f| f.write(failure_count) }) : (puts "All specs in Thread #{env_test_number} passed")
|
27
27
|
puts "Thread #{env_test_number} has completed in #{duration}"
|
data/lib/parallelized_specs.rb
CHANGED
@@ -116,8 +116,22 @@ class ParallelizedSpecs
|
|
116
116
|
puts ""
|
117
117
|
puts "Took #{Time.now - start} seconds"
|
118
118
|
|
119
|
-
Dir.glob('tmp/parallel_log/spec_count/{*,.*}').count == 2
|
120
|
-
|
119
|
+
if Dir.glob('tmp/parallel_log/spec_count/{*,.*}').count == 2
|
120
|
+
(puts "All threads completed")
|
121
|
+
else
|
122
|
+
threads = Dir["/tmp/parallel_log/spec_count/*"]
|
123
|
+
threads.each do |t|
|
124
|
+
failed_thread = t.match(/\d/).to_s
|
125
|
+
if failed_thread == "1"
|
126
|
+
puts "Thread 1 last spec to start running"
|
127
|
+
puts IO.readlines("tmp/parallel_log/thread_")[-1]
|
128
|
+
else
|
129
|
+
puts "Thread #{failed_thread} last spec to start running"
|
130
|
+
puts IO.readlines("tmp/parallel_log/thread_#{failed_thread}")[-1]
|
131
|
+
end
|
132
|
+
end
|
133
|
+
(abort "One or more threads have failed, see above logging information for details") #works on both 1.8.7\1.9.3
|
134
|
+
end
|
121
135
|
#exit with correct status code so rake parallel:test && echo 123 works
|
122
136
|
|
123
137
|
failed = test_results.any? { |result| result[:exit_status] != 0 } #ruby 1.8.7 works breaks on 1.9.3
|
@@ -128,7 +142,7 @@ class ParallelizedSpecs
|
|
128
142
|
ParallelizedSpecs.rerun()
|
129
143
|
else
|
130
144
|
abort "#{name.capitalize}s Failed" if Dir.glob('tmp/parallel_log/failed_specs/{*,.*}').count > 2 || if failed #works on both 1.8.7\1.9.3
|
131
|
-
|
145
|
+
end
|
132
146
|
end
|
133
147
|
#this is getting run even if the rerun passes and causes triggers abort on successful reruns
|
134
148
|
puts "marking build as PASSED"
|
@@ -351,5 +365,6 @@ class ParallelizedSpecs
|
|
351
365
|
end
|
352
366
|
end
|
353
367
|
end
|
368
|
+
|
354
369
|
end
|
355
370
|
|
data/parallelized_specs.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "parallelized_specs"
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.80"
|
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"]
|
12
|
-
s.date = "2012-12-
|
12
|
+
s.date = "2012-12-17"
|
13
13
|
s.email = "jake@instructure.com"
|
14
14
|
s.files = [
|
15
15
|
"Gemfile",
|
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: 179
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 80
|
10
|
+
version: 0.3.80
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jake Sorce, Bryan Madsen, Shawn Meredith
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-12-
|
18
|
+
date: 2012-12-17 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: parallel
|