parallelized_specs 0.4.40 → 0.4.41

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.4.40"
15
+ gem.version = "0.4.41"
16
16
  end
17
17
  Jeweler::GemcutterTasks.new
18
18
  rescue LoadError
@@ -123,7 +123,8 @@ class ParallelizedSpecs
123
123
  if Dir.glob("#{RAILS_ROOT}/tmp/parallel_log/spec_count/{*,.*}").count == 2 && Dir.glob("#{RAILS_ROOT}/tmp/parallel_log/thread_started/{*,.*}").count == num_processes + 2
124
124
  (puts "INFO: All threads completed")
125
125
  elsif Dir.glob("#{RAILS_ROOT}/tmp/parallel_log/thread_started/{*,.*}").count != num_processes + 2
126
- File.open("#{RAILS_ROOT}/tmpfailure_cause.log", 'a+') { |f| f.write "Syntax errors" }
126
+ File.open("#{RAILS_ROOT}/tmp/parallel_log/error.log", 'a+') { |f| f.write "\n\n\n syntax issues" }
127
+ File.open("#{RAILS_ROOT}/tmp/failure_cause.log", 'a+') { |f| f.write "Syntax errors" }
127
128
  abort "SEVERE: one or more threads didn't get started by rspec, this may be caused by a syntax issue in specs, check logs right before specs start running"
128
129
  else
129
130
  threads = Dir["#{RAILS_ROOT}/tmp/parallel_log/spec_count/*"]
@@ -131,10 +132,12 @@ class ParallelizedSpecs
131
132
  failed_thread = t.match(/\d/).to_s
132
133
  if failed_thread == "1"
133
134
  puts "INFO: Thread 1 last spec to start running"
134
- puts IO.readlines("#{RAILS_ROOT}/tmp/parallel_log/thread_.log")[-1]
135
+ last_spec = IO.readlines("#{RAILS_ROOT}/tmp/parallel_log/thread_.log")[-1]
136
+ File.open("#{RAILS_ROOT}/tmp/parallel_log/error.log", 'a+') { |f| f.write "\n\n\n\nrspec thread #{failed_thread} failed to complete\n the last spec to try to run was #{last_spec}" }
135
137
  else
136
138
  puts "INFO: Thread #{failed_thread} last spec to start running"
137
- puts IO.readlines("#{RAILS_ROOT}/tmp/parallel_log/thread_#{failed_thread}.log")[-1]
139
+ last_spec = IO.readlines("#{RAILS_ROOT}/tmp/parallel_log/thread_#{failed_thread}.log")[-1]
140
+ File.open("#{RAILS_ROOT}/tmp/parallel_log/error.log", 'a+') { |f| f.write "\n\n\n\nrspec thread #{failed_thread} failed to complete\n the last spec to try to run was #{last_spec}" }
138
141
  end
139
142
  end
140
143
  File.open("#{RAILS_ROOT}/tmp/failure_cause.log", 'a+') { |f| f.write "rspec thread failed to complete" }
@@ -300,6 +303,7 @@ class ParallelizedSpecs
300
303
 
301
304
  def self.update_rerun_summary(l, outcome, stack = "")
302
305
  File.open(@failure_summary, 'a+') { |f| f.puts("Outcome #{outcome} for #{l}\n #{stack}") }
306
+ File.open("#{RAILS_ROOT}/tmp/parallel_log/error.log", 'a+') { |f| f.puts("Outcome #{outcome} for #{l}\n #{stack}") } if outcome == "FAILED"
303
307
  end
304
308
 
305
309
  def self.parse_result(result)
@@ -386,7 +390,7 @@ class ParallelizedSpecs
386
390
  @error_count = %x{wc -l "#{@filename}"}.match(/\d*[^\D]/).to_s #counts the number of lines in the file
387
391
  @error_count = @error_count.to_i
388
392
  puts "INFO: error count = #@error_count"
389
- ENV["RERUNS"] != nil ? @max_reruns = ENV["RERUNS"].to_i : @max_reruns = 9
393
+ ENV["RERUNS"] != nil ? @max_reruns = ENV["RERUNS"].to_i : @max_reruns = 9
390
394
 
391
395
  if !@error_count.between?(1, @max_reruns)
392
396
  puts "INFO: total errors are not in rerun eligibility range"
@@ -418,6 +422,7 @@ class ParallelizedSpecs
418
422
  end
419
423
  end
420
424
  puts "INFO: failures meet rerun criteria \n INFO: rerunning #{@error_count} examples"
425
+ File.open("#{RAILS_ROOT}/tmp/parallel_log/error.log", 'a+') { |f| f.puts("\n\n\n\n\n *****RERUN FAILURES*****\n") }
421
426
  end
422
427
 
423
428
  def self.start_reruns
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "parallelized_specs"
8
- s.version = "0.4.40"
8
+ s.version = "0.4.41"
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 = "2013-03-29"
12
+ s.date = "2013-04-04"
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: 95
4
+ hash: 93
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 40
10
- version: 0.4.40
9
+ - 41
10
+ version: 0.4.41
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: 2013-03-29 00:00:00 Z
18
+ date: 2013-04-04 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: parallel