parallel_tests 4.5.1 → 4.6.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 +2 -0
- data/lib/parallel_tests/cli.rb +1 -0
- data/lib/parallel_tests/test/runner.rb +5 -2
- data/lib/parallel_tests/version.rb +1 -1
- data/lib/parallel_tests.rb +2 -0
- 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: 82339af23324161c5818c27e55fdadcbcac91ab832f76ce791a6deb289f77233
|
4
|
+
data.tar.gz: 0fd923d52f7e368ef4c8e99e7874a465c7213960b1fd6e455404e472dc00ab90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee5cb110a617b78e8761c5e01894827b63cccbe6a239b491841949bf2ebe2e9d68a43d4bb0d0a5600cdc6904e8cffba816eb424ca5883865daf661cf7b208f91
|
7
|
+
data.tar.gz: e23de90f4aed3c4571252385a251c3765718c3e2fd34aaf342307667b6710819aff652b4c1709dab2152fe0b81217f2d2fb1b98cf308d8c40e3190d91374337d
|
data/Readme.md
CHANGED
@@ -279,6 +279,7 @@ 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. Useful for local debugging
|
282
283
|
--unknown-runtime [FLOAT] Use given number as unknown runtime (otherwise use average time)
|
283
284
|
--first-is-1 Use "1" as TEST_ENV_NUMBER to not reuse the default test environment
|
284
285
|
--fail-fast Stop all groups when one group fails (best used with --test-options '--fail-fast' if supported
|
@@ -438,6 +439,7 @@ inspired by [pivotal labs](https://blog.pivotal.io/labs/labs/parallelize-your-rs
|
|
438
439
|
- [Eric Kessler](https://github.com/enkessler)
|
439
440
|
- [Adis Osmonov](https://github.com/adis-io)
|
440
441
|
- [Josh Westbrook](https://github.com/joshwestbrook)
|
442
|
+
- [Jay Dorsey](https://github.com/jaydorsey)
|
441
443
|
|
442
444
|
[Michael Grosser](http://grosser.it)<br/>
|
443
445
|
michael@grosser.it<br/>
|
data/lib/parallel_tests/cli.rb
CHANGED
@@ -278,6 +278,7 @@ module ParallelTests
|
|
278
278
|
opts.on("--nice", "execute test commands with low priority.") { options[:nice] = true }
|
279
279
|
opts.on("--runtime-log [PATH]", "Location of previously recorded test runtimes") { |path| options[:runtime_log] = path }
|
280
280
|
opts.on("--allowed-missing [INT]", Integer, "Allowed percentage of missing runtimes (default = 50)") { |percent| options[:allowed_missing_percent] = percent }
|
281
|
+
opts.on('--allow-duplicates', 'When detecting files to run, allow duplicates') { options[:allow_duplicates] = true }
|
281
282
|
opts.on("--unknown-runtime [FLOAT]", Float, "Use given number as unknown runtime (otherwise use average time)") { |time| options[:unknown_runtime] = time }
|
282
283
|
opts.on("--first-is-1", "Use \"1\" as TEST_ENV_NUMBER to not reuse the default test environment") { options[:first_is_1] = true }
|
283
284
|
opts.on("--fail-fast", "Stop all groups when one group fails (best used with --test-options '--fail-fast' if supported") { options[:fail_fast] = true }
|
@@ -238,8 +238,9 @@ module ParallelTests
|
|
238
238
|
suffix_pattern = options[:suffix] || test_suffix
|
239
239
|
include_pattern = options[:pattern] || //
|
240
240
|
exclude_pattern = options[:exclude_pattern]
|
241
|
+
allow_duplicates = options[:allow_duplicates]
|
241
242
|
|
242
|
-
(tests || []).flat_map do |file_or_folder|
|
243
|
+
files = (tests || []).flat_map do |file_or_folder|
|
243
244
|
if File.directory?(file_or_folder)
|
244
245
|
files = files_in_folder(file_or_folder, options)
|
245
246
|
files = files.grep(suffix_pattern).grep(include_pattern)
|
@@ -248,7 +249,9 @@ module ParallelTests
|
|
248
249
|
else
|
249
250
|
file_or_folder
|
250
251
|
end
|
251
|
-
end
|
252
|
+
end
|
253
|
+
|
254
|
+
allow_duplicates ? files : files.uniq
|
252
255
|
end
|
253
256
|
|
254
257
|
def files_in_folder(folder, options = {})
|
data/lib/parallel_tests.rb
CHANGED
@@ -44,6 +44,8 @@ module ParallelTests
|
|
44
44
|
|
45
45
|
def stop_all_processes
|
46
46
|
pids.all.each { |pid| Process.kill(:INT, pid) }
|
47
|
+
rescue Errno::ESRCH
|
48
|
+
# Process already terminated, do nothing
|
47
49
|
end
|
48
50
|
|
49
51
|
# copied from http://github.com/carlhuda/bundler Bundler::SharedHelpers#find_gemfile
|
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.6.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: 2024-
|
11
|
+
date: 2024-03-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.6.0/Readme.md
|
73
|
+
source_code_uri: https://github.com/grosser/parallel_tests/tree/v4.6.0
|
74
74
|
wiki_uri: https://github.com/grosser/parallel_tests/wiki
|
75
75
|
post_install_message:
|
76
76
|
rdoc_options: []
|