parallel_tests 2.21.3 → 2.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Readme.md +4 -2
- data/lib/parallel_tests/cli.rb +16 -5
- data/lib/parallel_tests/test/runner.rb +1 -1
- data/lib/parallel_tests/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 947b804510029caa4e25723127959f31d6b79cc0fcbb02e9b4923d945fad9563
|
4
|
+
data.tar.gz: f9044e07af3546d4fed87c1d71867b88fd609d6f75c0449d58668b783e5c4e85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2e51020b7e3059bcea3c9123ea88f96fc1bfd84a6c474831b5afa7989c5417b581a0806d8cc100d37d14cd921c54a92af70c647e382bdded1e073c632ccf5d7
|
7
|
+
data.tar.gz: 37571018492cc415bd7ed6fdf939cbbb1da729af418667f56c375852ee7e8a6afdd3a5df74cd9175d09149367b31e71131ca51b069aaa442b81a3078285ad5da
|
data/Readme.md
CHANGED
@@ -113,7 +113,7 @@ Rspec: Add to your `.rspec_parallel` (or `.rspec`) :
|
|
113
113
|
--format progress
|
114
114
|
--format ParallelTests::RSpec::RuntimeLogger --out tmp/parallel_runtime_rspec.log
|
115
115
|
|
116
|
-
To use a custom logfile location (default: `tmp/
|
116
|
+
To use a custom logfile location (default: `tmp/parallel_runtime_rspec.log`), use the CLI: `parallel_test spec -t rspec --runtime-log my.log`
|
117
117
|
|
118
118
|
### Test::Unit & Minitest 4/5
|
119
119
|
|
@@ -224,6 +224,7 @@ Options are:
|
|
224
224
|
--allowed-missing Allowed percentage of missing runtimes (default = 50)
|
225
225
|
--unknown-runtime [FLOAT] Use given number as unknown runtime (otherwise use average time)
|
226
226
|
--verbose Print more output
|
227
|
+
--quiet Do not print anything, appart from test output
|
227
228
|
-v, --version Show Version
|
228
229
|
-h, --help Show this.
|
229
230
|
|
@@ -279,7 +280,7 @@ TIPS
|
|
279
280
|
- [Sphinx setup](https://github.com/grosser/parallel_tests/wiki)
|
280
281
|
- [Capistrano setup](https://github.com/grosser/parallel_tests/wiki/Remotely-with-capistrano) let your tests run on a big box instead of your laptop
|
281
282
|
|
282
|
-
Contribute your own
|
283
|
+
Contribute your own gotchas to the [Wiki](https://github.com/grosser/parallel_tests/wiki) or even better open a PR :)
|
283
284
|
|
284
285
|
TODO
|
285
286
|
====
|
@@ -369,6 +370,7 @@ inspired by [pivotal labs](https://blog.pivotal.io/labs/labs/parallelize-your-rs
|
|
369
370
|
- [Aleksei Gusev](https://github.com/hron)
|
370
371
|
- [Scott Olsen](https://github.com/scottolsen)
|
371
372
|
- [Andrei Botalov](https://github.com/abotalov)
|
373
|
+
- [Zachary Attas](https://github.com/snackattas)
|
372
374
|
|
373
375
|
[Michael Grosser](http://grosser.it)<br/>
|
374
376
|
michael@grosser.it<br/>
|
data/lib/parallel_tests/cli.rb
CHANGED
@@ -58,25 +58,31 @@ module ParallelTests
|
|
58
58
|
def run_tests_in_parallel(num_processes, options)
|
59
59
|
test_results = nil
|
60
60
|
|
61
|
-
|
61
|
+
run_tests_proc = -> {
|
62
62
|
groups = @runner.tests_in_groups(options[:files], num_processes, options)
|
63
63
|
groups.reject! &:empty?
|
64
64
|
|
65
65
|
test_results = if options[:only_group]
|
66
66
|
groups_to_run = options[:only_group].collect{|i| groups[i - 1]}.compact
|
67
|
-
report_number_of_tests(groups_to_run)
|
67
|
+
report_number_of_tests(groups_to_run) unless options[:quiet]
|
68
68
|
execute_in_parallel(groups_to_run, groups_to_run.size, options) do |group|
|
69
69
|
run_tests(group, groups_to_run.index(group), 1, options)
|
70
70
|
end
|
71
71
|
else
|
72
|
-
report_number_of_tests(groups)
|
72
|
+
report_number_of_tests(groups) unless options[:quiet]
|
73
73
|
|
74
74
|
execute_in_parallel(groups, groups.size, options) do |group|
|
75
75
|
run_tests(group, groups.index(group), num_processes, options)
|
76
76
|
end
|
77
77
|
end
|
78
78
|
|
79
|
-
report_results(test_results, options)
|
79
|
+
report_results(test_results, options) unless options[:quiet]
|
80
|
+
}
|
81
|
+
|
82
|
+
if options[:quiet]
|
83
|
+
run_tests_proc.call
|
84
|
+
else
|
85
|
+
report_time_taken(&run_tests_proc)
|
80
86
|
end
|
81
87
|
|
82
88
|
abort final_fail_message if any_test_failed?(test_results)
|
@@ -215,11 +221,16 @@ module ParallelTests
|
|
215
221
|
opts.on("--allowed-missing [INT]", Integer, "Allowed percentage of missing runtimes (default = 50)") { |percent| options[:allowed_missing_percent] = percent }
|
216
222
|
opts.on("--unknown-runtime [FLOAT]", Float, "Use given number as unknown runtime (otherwise use average time)") { |time| options[:unknown_runtime] = time }
|
217
223
|
opts.on("--first-is-1", "Use \"1\" as TEST_ENV_NUMBER to not reuse the default test environment") { options[:first_is_1] = true }
|
218
|
-
opts.on("--verbose", "Print more output") { options[:verbose] = true }
|
224
|
+
opts.on("--verbose", "Print more output (mutually exclusive with quiet)") { options[:verbose] = true }
|
225
|
+
opts.on("--quiet", "Print tests output only (mutually exclusive with verbose)") { options[:quiet] = true }
|
219
226
|
opts.on("-v", "--version", "Show Version") { puts ParallelTests::VERSION; exit }
|
220
227
|
opts.on("-h", "--help", "Show this.") { puts opts; exit }
|
221
228
|
end.parse!(argv)
|
222
229
|
|
230
|
+
if options[:verbose] && options[:quiet]
|
231
|
+
raise "Both options are mutually exclusive: verbose & quiet"
|
232
|
+
end
|
233
|
+
|
223
234
|
if options[:count] == 0
|
224
235
|
options.delete(:count)
|
225
236
|
options[:non_parallel] = true
|
@@ -175,7 +175,7 @@ module ParallelTests
|
|
175
175
|
allowed_missing -= 1 unless time = runtimes[test]
|
176
176
|
if allowed_missing < 0
|
177
177
|
log = options[:runtime_log] || runtime_log
|
178
|
-
raise "Runtime log file '#{log}' does not
|
178
|
+
raise "Runtime log file '#{log}' does not contain sufficient data to sort #{tests.size} test files, please update it."
|
179
179
|
end
|
180
180
|
[test, time]
|
181
181
|
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: 2.
|
4
|
+
version: 2.22.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
82
|
version: '0'
|
83
83
|
requirements: []
|
84
84
|
rubyforge_project:
|
85
|
-
rubygems_version: 2.7.
|
85
|
+
rubygems_version: 2.7.6
|
86
86
|
signing_key:
|
87
87
|
specification_version: 4
|
88
88
|
summary: Run Test::Unit / RSpec / Cucumber / Spinach in parallel
|