parallel_tests 4.5.2 → 4.6.0

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
  SHA256:
3
- metadata.gz: 45b8232e3e41cd559e94530f55ca9cf0b8336eebc563a370b0c2b20688aabcb2
4
- data.tar.gz: 40208b56455ad6bd4498c3b8e75c20b27fb813f1ac192130ddf12570c240a7b4
3
+ metadata.gz: 82339af23324161c5818c27e55fdadcbcac91ab832f76ce791a6deb289f77233
4
+ data.tar.gz: 0fd923d52f7e368ef4c8e99e7874a465c7213960b1fd6e455404e472dc00ab90
5
5
  SHA512:
6
- metadata.gz: 9019208e52a23c231d85b24e05b06eca84a0337303fdd2922d5d465217210df25768f72300ba54c30ab2768af741617af6ec734fa51c78858837f93a8277f46d
7
- data.tar.gz: 75003af6f40dad1c00eb208e9f0c9a24bc6cec3b06e95dc54b18e0b9dc59cbfe6ee817214b23a67b4bc23a0a0a7f8966d1f0950877a0f13306939a0cca155e3c
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/>
@@ -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.uniq
252
+ end
253
+
254
+ allow_duplicates ? files : files.uniq
252
255
  end
253
256
 
254
257
  def files_in_folder(folder, options = {})
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ParallelTests
3
- VERSION = '4.5.2'
3
+ VERSION = '4.6.0'
4
4
  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: 4.5.2
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-03-05 00:00:00.000000000 Z
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.5.2/Readme.md
73
- source_code_uri: https://github.com/grosser/parallel_tests/tree/v4.5.2
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: []