parallelized_specs 0.3.86 → 0.3.87

Sign up to get free protection for your applications and to get access to all the features.
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.86"
15
+ gem.version = "0.3.87"
16
16
  end
17
17
  Jeweler::GemcutterTasks.new
18
18
  rescue LoadError
@@ -27,6 +27,7 @@ module RSpec
27
27
  end
28
28
 
29
29
  def retry_command(example)
30
+ puts "Storing #{example_group.location} for a post build rerun attempt"
30
31
  spec_file = example_group.location.gsub("\"", "\\\"").match(/\/.*b/).to_s
31
32
  spec_name = example.description
32
33
  "SPEC=#{spec_file} SPEC_OPTS='-e \"#{spec_name}\"'"
@@ -10,6 +10,7 @@ module RSpec
10
10
  env_test_number = 1 if ENV['TEST_ENV_NUMBER'].blank?
11
11
  puts "Thread #{env_test_number.to_s} has #{@example_count} specs"
12
12
  File.open("tmp/parallel_log/spec_count/total_specs#{env_test_number}.txt", 'a+') { |f| f.write(@example_count) }
13
+ File.open("tmp/parallel_log/thread_started/thread_#{env_test_number}.txt", 'a+') { |f| f.write("") }
13
14
  super
14
15
  end
15
16
 
@@ -112,12 +112,15 @@ class ParallelizedSpecs
112
112
  puts ""
113
113
  puts summarize_results(results)
114
114
 
115
+
115
116
  #report total time taken
116
117
  puts ""
117
118
  puts "Took #{Time.now - start} seconds"
118
119
 
119
- if Dir.glob('tmp/parallel_log/spec_count/{*,.*}').count == 2
120
+ if Dir.glob('tmp/parallel_log/spec_count/{*,.*}').count == 2 && Dir.glob('tmp/parallel_log/thread_started/{*,.*}').count == num_processes + 2
120
121
  (puts "All threads completed")
122
+ elsif Dir.glob('tmp/parallel_log/thread_started/{*,.*}').count != num_processes + 2
123
+ abort "one or more threads didn't get started by rspec"
121
124
  else
122
125
  threads = Dir["tmp/parallel_log/spec_count/*"]
123
126
  threads.each do |t|
@@ -130,7 +133,7 @@ class ParallelizedSpecs
130
133
  puts IO.readlines("tmp/parallel_log/thread_#{failed_thread}.log")[-1]
131
134
  end
132
135
  end
133
- (abort "One or more threads have failed, see above logging information for details") #works on both 1.8.7\1.9.3
136
+ abort "One or more threads have failed, see above logging information for details" #works on both 1.8.7\1.9.3
134
137
  end
135
138
  #exit with correct status code so rake parallel:test && echo 123 works
136
139
 
@@ -142,7 +145,7 @@ class ParallelizedSpecs
142
145
  ParallelizedSpecs.rerun()
143
146
  else
144
147
  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
145
- end
148
+ end
146
149
  end
147
150
  puts "marking build as PASSED"
148
151
  end
@@ -178,6 +181,7 @@ class ParallelizedSpecs
178
181
  f = open("|#{cmd}", 'r')
179
182
  output = fetch_output(f, options)
180
183
  f.close
184
+ puts "Exit status for process #{process_number} #{$?.exitstatus}"
181
185
  {:stdout => output, :exit_status => $?.exitstatus}
182
186
  end
183
187
 
@@ -308,7 +312,7 @@ class ParallelizedSpecs
308
312
  end
309
313
  end
310
314
 
311
- puts "failed specs will be rerun\n rerunning #{@error_count} examples again"
315
+ puts "failed specs will be rerun\n rerunning #{@error_count} examples"
312
316
  @rerun_failures ||= []
313
317
  @rerun_passes ||= []
314
318
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "parallelized_specs"
8
- s.version = "0.3.86"
8
+ s.version = "0.3.87"
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-18"
12
+ s.date = "2013-01-07"
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: 191
4
+ hash: 189
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 86
10
- version: 0.3.86
9
+ - 87
10
+ version: 0.3.87
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 00:00:00 Z
18
+ date: 2013-01-07 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: parallel