parallel_tests 1.6.0 → 1.6.1
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.
- checksums.yaml +4 -4
- data/lib/parallel_tests/cli.rb +5 -3
- data/lib/parallel_tests/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9ee99b584667b4b87d1c7400b2acd8d1b312ad3
|
4
|
+
data.tar.gz: 43ad3279c3e8e7c53983df224fe14549c663b769
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a2bda0007aac736d55ec16ec9afc71d80c058d5c25f854f09ec7f4aa243f66e2090727fbda469e4a4d565053f9c4de8035322bdaacd882b45ab1a898d515b58
|
7
|
+
data.tar.gz: f1b384a8992b2fa9f1150ae5530fff2f06c34267b00a6e0c2d2d58a4a9b238eded8b442bfc97036276cec63e849acf6295e695322731e18b3a11eb24aac158f1
|
data/lib/parallel_tests/cli.rb
CHANGED
@@ -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
|
-
|
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
|
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.
|
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-
|
11
|
+
date: 2015-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|