parallel_tests 1.6.0 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1085d9a278d31ab6a969729c496a8d98a4eb2c7e
4
- data.tar.gz: c7b5aa3e5e86b601309beffe3b54c1848e2177a4
3
+ metadata.gz: e9ee99b584667b4b87d1c7400b2acd8d1b312ad3
4
+ data.tar.gz: 43ad3279c3e8e7c53983df224fe14549c663b769
5
5
  SHA512:
6
- metadata.gz: 46d046ea02134bd696b668ff84e5bd1c01d23f2c24f1ad54619631794977be7b3b79639855609204f88305c9b3d926af207b4cbe0653ef8c3905b3f384f699b9
7
- data.tar.gz: 11924a9e09164952ad7c22b22880141555064ac3aba9a8f260cafe5666f82dc012874d217ae6160cd0bbac788b50eca56118c1aa8aee82a3060441e843e73a2d
6
+ metadata.gz: 5a2bda0007aac736d55ec16ec9afc71d80c058d5c25f854f09ec7f4aa243f66e2090727fbda469e4a4d565053f9c4de8035322bdaacd882b45ab1a898d515b58
7
+ data.tar.gz: f1b384a8992b2fa9f1150ae5530fff2f06c34267b00a6e0c2d2d58a4a9b238eded8b442bfc97036276cec63e849acf6295e695322731e18b3a11eb24aac158f1
@@ -35,9 +35,10 @@ module ParallelTests
35
35
 
36
36
  report_time_taken do
37
37
  groups = @runner.tests_in_groups(options[:files], num_processes, options)
38
+ groups.reject! &:empty?
38
39
 
39
40
  test_results = if options[:only_group]
40
- groups_to_run = options[:only_group].collect{|i| groups[i - 1]}
41
+ groups_to_run = options[:only_group].collect{|i| groups[i - 1]}.compact
41
42
  report_number_of_tests(groups_to_run)
42
43
  execute_in_parallel(groups_to_run, groups_to_run.size, options) do |group|
43
44
  run_tests(group, groups_to_run.index(group), 1, options)
@@ -92,8 +93,9 @@ module ParallelTests
92
93
  def report_number_of_tests(groups)
93
94
  name = @runner.test_file_name
94
95
  num_processes = groups.size
95
- num_tests = groups.map(&:size).inject(:+)
96
- puts "#{num_processes} processes for #{num_tests} #{name}s, ~ #{num_tests / groups.size} #{name}s per process"
96
+ num_tests = groups.map(&:size).inject(0, :+)
97
+ tests_per_process = (num_processes == 0 ? 0 : num_tests / num_processes)
98
+ puts "#{num_processes} processes for #{num_tests} #{name}s, ~ #{tests_per_process} #{name}s per process"
97
99
  end
98
100
 
99
101
  #exit with correct status code so rake parallel:test && echo 123 works
@@ -1,3 +1,3 @@
1
1
  module ParallelTests
2
- VERSION = Version = '1.6.0'
2
+ VERSION = Version = '1.6.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel_tests
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-20 00:00:00.000000000 Z
11
+ date: 2015-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel