parallel_tests 4.9.1 → 5.0.0
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 +1 -0
- data/lib/parallel_tests/cli.rb +4 -4
- data/lib/parallel_tests/rspec/runner.rb +0 -1
- data/lib/parallel_tests/version.rb +1 -1
- data/lib/parallel_tests.rb +19 -5
- metadata +7 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f8210b7a13ef9c5963815803bf4223010576100b0ea49c7350ef049f05983e1
|
4
|
+
data.tar.gz: dc327141be25d0e5558366656c4024f9302ae0df49793366d85fd07ddf30963a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a38574598529a0f7307c062a3e3d07b4e5b14924ad97280a03d96f6e7742035541b5e728600c7885e815c78fd193c6bd69c56af8c6bc0878df074f87883e6af
|
7
|
+
data.tar.gz: 0c4bc740fed525235b6bb79d15a6c24e1d08252691616eb331525e3125b8048e0ba50fc6896268c6f185d880f5fba548cbb4ebe61250d4f45b4c65a12d169bc5
|
data/Readme.md
CHANGED
@@ -335,6 +335,7 @@ TIPS
|
|
335
335
|
e.g. `config.cache_store = ..., namespace: "test_#{ENV['TEST_ENV_NUMBER']}"`
|
336
336
|
- Debug errors that only happen with multiple files using `--verbose` and [cleanser](https://github.com/grosser/cleanser)
|
337
337
|
- `export PARALLEL_TEST_PROCESSORS=13` to override default processor count
|
338
|
+
- `export PARALLEL_TEST_MULTIPLE=.5` to override default processor multiplier
|
338
339
|
- Shell alias: `alias prspec='parallel_rspec -m 2 --'`
|
339
340
|
- [Spring] Add the [spring-commands-parallel-tests](https://github.com/DocSpring/spring-commands-parallel-tests) gem to your `Gemfile` to get `parallel_tests` working with Spring.
|
340
341
|
- `--first-is-1` will make the first environment be `1`, so you can test while running your full suite.<br/>
|
data/lib/parallel_tests/cli.rb
CHANGED
@@ -15,7 +15,7 @@ module ParallelTests
|
|
15
15
|
ENV['DISABLE_SPRING'] ||= '1'
|
16
16
|
|
17
17
|
num_processes = ParallelTests.determine_number_of_processes(options[:count])
|
18
|
-
num_processes
|
18
|
+
num_processes = (num_processes * ParallelTests.determine_multiple(options[:multiply])).round
|
19
19
|
|
20
20
|
options[:first_is_1] ||= first_is_1?
|
21
21
|
|
@@ -220,8 +220,8 @@ module ParallelTests
|
|
220
220
|
default - runtime when runtime log is filled otherwise filesize
|
221
221
|
TEXT
|
222
222
|
) { |type| options[:group_by] = type.to_sym }
|
223
|
-
opts.on("-m COUNT", "--multiply-processes COUNT", Float, "use given number as a multiplier of processes to run") do |
|
224
|
-
options[:
|
223
|
+
opts.on("-m COUNT", "--multiply-processes COUNT", Float, "use given number as a multiplier of processes to run") do |m|
|
224
|
+
options[:multiply_processes] = m
|
225
225
|
end
|
226
226
|
|
227
227
|
opts.on("-s PATTERN", "--single PATTERN", "Run all matching files in the same process") do |pattern|
|
@@ -349,7 +349,7 @@ module ParallelTests
|
|
349
349
|
raise "--group-by #{allowed.join(" or ")} is required for --only-group"
|
350
350
|
end
|
351
351
|
|
352
|
-
if options[:specify_groups] &&
|
352
|
+
if options[:specify_groups] && options.keys.intersect?([:single_process, :isolate, :isolate_count])
|
353
353
|
raise "Can't pass --specify-groups with any of these keys: --single, --isolate, or --isolate-n"
|
354
354
|
end
|
355
355
|
|
@@ -4,7 +4,6 @@ require "parallel_tests/test/runner"
|
|
4
4
|
module ParallelTests
|
5
5
|
module RSpec
|
6
6
|
class Runner < ParallelTests::Test::Runner
|
7
|
-
DEV_NULL = (WINDOWS ? "NUL" : "/dev/null")
|
8
7
|
class << self
|
9
8
|
def run_tests(test_files, process_number, num_processes, options)
|
10
9
|
cmd = [*executable, *options[:test_options], *color, *spec_opts, *test_files]
|
data/lib/parallel_tests.rb
CHANGED
@@ -6,6 +6,7 @@ require "rbconfig"
|
|
6
6
|
module ParallelTests
|
7
7
|
WINDOWS = (RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/)
|
8
8
|
RUBY_BINARY = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
|
9
|
+
DEFAULT_MULTIPLY_PROCESSES = 1.0
|
9
10
|
|
10
11
|
autoload :CLI, "parallel_tests/cli"
|
11
12
|
autoload :VERSION, "parallel_tests/version"
|
@@ -13,12 +14,25 @@ module ParallelTests
|
|
13
14
|
autoload :Pids, "parallel_tests/pids"
|
14
15
|
|
15
16
|
class << self
|
17
|
+
# used by external libraries, do not rename or change api
|
16
18
|
def determine_number_of_processes(count)
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
Integer(
|
20
|
+
[
|
21
|
+
count,
|
22
|
+
ENV["PARALLEL_TEST_PROCESSORS"],
|
23
|
+
Parallel.processor_count
|
24
|
+
].detect { |c| !c.to_s.strip.empty? }
|
25
|
+
)
|
26
|
+
end
|
27
|
+
|
28
|
+
def determine_multiple(multiple)
|
29
|
+
Float(
|
30
|
+
[
|
31
|
+
multiple,
|
32
|
+
ENV["PARALLEL_TEST_MULTIPLY_PROCESSES"],
|
33
|
+
DEFAULT_MULTIPLY_PROCESSES
|
34
|
+
].detect { |c| !c.to_s.strip.empty? }
|
35
|
+
)
|
22
36
|
end
|
23
37
|
|
24
38
|
def with_pid_file
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parallel_tests
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date: 2025-
|
10
|
+
date: 2025-03-01 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: parallel
|
@@ -24,7 +23,6 @@ dependencies:
|
|
24
23
|
- - ">="
|
25
24
|
- !ruby/object:Gem::Version
|
26
25
|
version: '0'
|
27
|
-
description:
|
28
26
|
email: michael@grosser.it
|
29
27
|
executables:
|
30
28
|
- parallel_spinach
|
@@ -69,12 +67,11 @@ licenses:
|
|
69
67
|
- MIT
|
70
68
|
metadata:
|
71
69
|
bug_tracker_uri: https://github.com/grosser/parallel_tests/issues
|
72
|
-
changelog_uri: https://github.com/grosser/parallel_tests/blob/
|
73
|
-
documentation_uri: https://github.com/grosser/parallel_tests/blob/
|
74
|
-
source_code_uri: https://github.com/grosser/parallel_tests/tree/
|
70
|
+
changelog_uri: https://github.com/grosser/parallel_tests/blob/v5.0.0/CHANGELOG.md
|
71
|
+
documentation_uri: https://github.com/grosser/parallel_tests/blob/v5.0.0/Readme.md
|
72
|
+
source_code_uri: https://github.com/grosser/parallel_tests/tree/v5.0.0
|
75
73
|
wiki_uri: https://github.com/grosser/parallel_tests/wiki
|
76
74
|
rubygems_mfa_required: 'true'
|
77
|
-
post_install_message:
|
78
75
|
rdoc_options: []
|
79
76
|
require_paths:
|
80
77
|
- lib
|
@@ -82,15 +79,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
82
79
|
requirements:
|
83
80
|
- - ">="
|
84
81
|
- !ruby/object:Gem::Version
|
85
|
-
version: 3.
|
82
|
+
version: 3.2.0
|
86
83
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
84
|
requirements:
|
88
85
|
- - ">="
|
89
86
|
- !ruby/object:Gem::Version
|
90
87
|
version: '0'
|
91
88
|
requirements: []
|
92
|
-
rubygems_version: 3.
|
93
|
-
signing_key:
|
89
|
+
rubygems_version: 3.6.2
|
94
90
|
specification_version: 4
|
95
91
|
summary: Run Test::Unit / RSpec / Cucumber / Spinach in parallel
|
96
92
|
test_files: []
|