parallel_tests 4.6.1 → 4.7.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/Readme.md +9 -6
- data/lib/parallel_tests/cli.rb +23 -9
- data/lib/parallel_tests/test/runner.rb +1 -1
- data/lib/parallel_tests/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b091de564b1cd9f2c57b94dd973bceea01f7722e4c6bafbe71e6b75c7a265421
|
4
|
+
data.tar.gz: bf14a02a03bef8046e2973a904701f03b10bdae1ef8a84654511c18631efe179
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4d7df8aed6d01ba8a9b98064a4c88ad7b88270884d9b5f24c34c2094772974c81fef357c9534e97265e57603b780c9b61af4b1a70a32ae6891ba87256633dfd
|
7
|
+
data.tar.gz: a0f0e19e7d02d3046f41ebe8c51a72056bd840d25b54947564b5b015df8946f0e4b0c86920b3cabca7ff1a82f29dcbb44e53daeaf92ae3721de29b6388c92fe0
|
data/Readme.md
CHANGED
@@ -250,8 +250,9 @@ Options are:
|
|
250
250
|
-m, --multiply-processes [FLOAT] use given number as a multiplier of processes to run
|
251
251
|
-s, --single [PATTERN] Run all matching files in the same process
|
252
252
|
-i, --isolate Do not run any other tests in the group used by --single(-s)
|
253
|
-
--isolate-n [PROCESSES] Use 'isolate' singles with number of processes, default: 1
|
253
|
+
--isolate-n [PROCESSES] Use 'isolate' singles with number of processes, default: 1
|
254
254
|
--highest-exit-status Exit with the highest exit status provided by test run(s)
|
255
|
+
--failure-exit-code [INT] Specify the exit code to use when tests fail
|
255
256
|
--specify-groups [SPECS] Use 'specify-groups' if you want to specify multiple specs running in multiple
|
256
257
|
processes in a specific formation. Commas indicate specs in the same process,
|
257
258
|
pipes indicate specs in a new process. Cannot use with --single, --isolate, or
|
@@ -260,9 +261,8 @@ Options are:
|
|
260
261
|
Process 1 will contain 1_spec.rb and 2_spec.rb
|
261
262
|
Process 2 will contain 3_spec.rb
|
262
263
|
Process 3 will contain all other specs
|
263
|
-
--only-group INT[,INT] Only run the given group numbers.
|
264
|
-
|
265
|
-
set it otherwise via the '-group-by' flag.
|
264
|
+
--only-group INT[,INT] Only run the given group numbers.
|
265
|
+
Changes `--group-by` default to 'filesize'.
|
266
266
|
-e, --exec [COMMAND] execute this code parallel and with ENV['TEST_ENV_NUMBER']
|
267
267
|
-o, --test-options '[OPTIONS]' execute test commands with those options
|
268
268
|
-t, --type [TYPE] test(default) / rspec / cucumber / spinach
|
@@ -279,12 +279,14 @@ Options are:
|
|
279
279
|
--nice execute test commands with low priority.
|
280
280
|
--runtime-log [PATH] Location of previously recorded test runtimes
|
281
281
|
--allowed-missing [INT] Allowed percentage of missing runtimes (default = 50)
|
282
|
-
--allow-duplicates When detecting files to run, allow duplicates
|
282
|
+
--allow-duplicates When detecting files to run, allow duplicates
|
283
283
|
--unknown-runtime [FLOAT] Use given number as unknown runtime (otherwise use average time)
|
284
284
|
--first-is-1 Use "1" as TEST_ENV_NUMBER to not reuse the default test environment
|
285
285
|
--fail-fast Stop all groups when one group fails (best used with --test-options '--fail-fast' if supported
|
286
286
|
--verbose Print debug output
|
287
|
-
--verbose-command
|
287
|
+
--verbose-command Combines options --verbose-process-command and --verbose-rerun-command
|
288
|
+
--verbose-process-command Print the command that will be executed by each process before it begins
|
289
|
+
--verbose-rerun-command After a process fails, print the command executed by that process
|
288
290
|
--quiet Print only tests output
|
289
291
|
-v, --version Show Version
|
290
292
|
-h, --help Show this.
|
@@ -440,6 +442,7 @@ inspired by [pivotal labs](https://blog.pivotal.io/labs/labs/parallelize-your-rs
|
|
440
442
|
- [Adis Osmonov](https://github.com/adis-io)
|
441
443
|
- [Josh Westbrook](https://github.com/joshwestbrook)
|
442
444
|
- [Jay Dorsey](https://github.com/jaydorsey)
|
445
|
+
- [hatsu](https://github.com/hatsu38)
|
443
446
|
|
444
447
|
[Michael Grosser](http://grosser.it)<br/>
|
445
448
|
michael@grosser.it<br/>
|
data/lib/parallel_tests/cli.rb
CHANGED
@@ -96,8 +96,9 @@ module ParallelTests
|
|
96
96
|
if any_test_failed?(test_results)
|
97
97
|
warn final_fail_message
|
98
98
|
|
99
|
-
|
100
|
-
|
99
|
+
exit_status = if options[:failure_exit_code]
|
100
|
+
options[:failure_exit_code]
|
101
|
+
elsif options[:highest_exit_status]
|
101
102
|
test_results.map { |data| data.fetch(:exit_status) }.max
|
102
103
|
else
|
103
104
|
1
|
@@ -145,7 +146,7 @@ module ParallelTests
|
|
145
146
|
failing_sets = test_results.reject { |r| r[:exit_status] == 0 }
|
146
147
|
return if failing_sets.none?
|
147
148
|
|
148
|
-
if options[:verbose] || options[:
|
149
|
+
if options[:verbose] || options[:verbose_rerun_command]
|
149
150
|
puts "\n\nTests have failed for a parallel_test group. Use the following command to run the group again:\n\n"
|
150
151
|
failing_sets.each do |failing_set|
|
151
152
|
command = failing_set[:command]
|
@@ -223,12 +224,19 @@ module ParallelTests
|
|
223
224
|
opts.on(
|
224
225
|
"--isolate-n [PROCESSES]",
|
225
226
|
Integer,
|
226
|
-
"Use 'isolate' singles with number of processes, default: 1
|
227
|
+
"Use 'isolate' singles with number of processes, default: 1"
|
227
228
|
) { |n| options[:isolate_count] = n }
|
228
229
|
|
229
|
-
opts.on(
|
230
|
-
|
231
|
-
|
230
|
+
opts.on(
|
231
|
+
"--highest-exit-status",
|
232
|
+
"Exit with the highest exit status provided by test run(s)"
|
233
|
+
) { options[:highest_exit_status] = true }
|
234
|
+
|
235
|
+
opts.on(
|
236
|
+
"--failure-exit-code [INT]",
|
237
|
+
Integer,
|
238
|
+
"Specify the exit code to use when tests fail"
|
239
|
+
) { |code| options[:failure_exit_code] = code }
|
232
240
|
|
233
241
|
opts.on(
|
234
242
|
"--specify-groups [SPECS]",
|
@@ -237,7 +245,7 @@ module ParallelTests
|
|
237
245
|
processes in a specific formation. Commas indicate specs in the same process,
|
238
246
|
pipes indicate specs in a new process. Cannot use with --single, --isolate, or
|
239
247
|
--isolate-n. Ex.
|
240
|
-
$
|
248
|
+
$ parallel_tests -n 3 . --specify-groups '1_spec.rb,2_spec.rb|3_spec.rb'
|
241
249
|
Process 1 will contain 1_spec.rb and 2_spec.rb
|
242
250
|
Process 2 will contain 3_spec.rb
|
243
251
|
Process 3 will contain all other specs
|
@@ -283,7 +291,9 @@ module ParallelTests
|
|
283
291
|
opts.on("--first-is-1", "Use \"1\" as TEST_ENV_NUMBER to not reuse the default test environment") { options[:first_is_1] = true }
|
284
292
|
opts.on("--fail-fast", "Stop all groups when one group fails (best used with --test-options '--fail-fast' if supported") { options[:fail_fast] = true }
|
285
293
|
opts.on("--verbose", "Print debug output") { options[:verbose] = true }
|
286
|
-
opts.on("--verbose-command", "
|
294
|
+
opts.on("--verbose-command", "Combines options --verbose-process-command and --verbose-rerun-command") { options.merge! verbose_process_command: true, verbose_rerun_command: true }
|
295
|
+
opts.on("--verbose-process-command", "Print the command that will be executed by each process before it begins") { options[:verbose_process_command] = true }
|
296
|
+
opts.on("--verbose-rerun-command", "After a process fails, print the command executed by that process") { options[:verbose_rerun_command] = true }
|
287
297
|
opts.on("--quiet", "Print only tests output") { options[:quiet] = true }
|
288
298
|
opts.on("-v", "--version", "Show Version") do
|
289
299
|
puts ParallelTests::VERSION
|
@@ -331,6 +341,10 @@ module ParallelTests
|
|
331
341
|
raise "Can't pass --specify-groups with any of these keys: --single, --isolate, or --isolate-n"
|
332
342
|
end
|
333
343
|
|
344
|
+
if options[:failure_exit_code] && options[:highest_exit_status]
|
345
|
+
raise "Can't pass --failure-exit-code and --highest-exit-status"
|
346
|
+
end
|
347
|
+
|
334
348
|
options
|
335
349
|
end
|
336
350
|
|
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: 4.
|
4
|
+
version: 4.7.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: 2024-04-
|
11
|
+
date: 2024-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|
@@ -69,8 +69,8 @@ licenses:
|
|
69
69
|
- MIT
|
70
70
|
metadata:
|
71
71
|
bug_tracker_uri: https://github.com/grosser/parallel_tests/issues
|
72
|
-
documentation_uri: https://github.com/grosser/parallel_tests/blob/v4.
|
73
|
-
source_code_uri: https://github.com/grosser/parallel_tests/tree/v4.
|
72
|
+
documentation_uri: https://github.com/grosser/parallel_tests/blob/v4.7.1/Readme.md
|
73
|
+
source_code_uri: https://github.com/grosser/parallel_tests/tree/v4.7.1
|
74
74
|
wiki_uri: https://github.com/grosser/parallel_tests/wiki
|
75
75
|
post_install_message:
|
76
76
|
rdoc_options: []
|