parallel_tests 5.0.1 → 5.2.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 +9 -11
- data/lib/parallel_tests/cli.rb +2 -1
- data/lib/parallel_tests/grouper.rb +8 -1
- data/lib/parallel_tests/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e72834dd1a8a2c46d1b09d8b6039c8b2189fba5b59d0e72fd738d349650f940
|
4
|
+
data.tar.gz: 1ba16b8a33eb3139b73d2c01476cfd89564cfa1de7b4c4b6a9b104afe7e229b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6189557d6e628b1fefe65103033027e4bd78d3eb1d9bc828427fbdc3780b23fb81b827b31626b05f196e26e9d8b721813e38a494bc4813ae38809939b60bae9b
|
7
|
+
data.tar.gz: 0b5135be07485245f7533139a6f559421156bffeba26d9ddd8c483e995988132610c13369f52c2d0b0fdc0f0962b09afa15c2ab167818e2f253fb73642f99bf4
|
data/Readme.md
CHANGED
@@ -129,7 +129,7 @@ Test groups will often run for different times, making the full test run as slow
|
|
129
129
|
|
130
130
|
### RSpec
|
131
131
|
|
132
|
-
Rspec: Add to your `.rspec_parallel` (or `.rspec`)
|
132
|
+
Rspec: Add to your `.rspec_parallel` (or `.rspec`), but can also be used via `--test-options='--format x'`:
|
133
133
|
|
134
134
|
--format progress
|
135
135
|
--format ParallelTests::RSpec::RuntimeLogger --out tmp/parallel_runtime_rspec.log
|
@@ -154,7 +154,7 @@ RSpec: SummaryLogger
|
|
154
154
|
|
155
155
|
Log the test output without the different processes overwriting each other.
|
156
156
|
|
157
|
-
Add the following to your `.rspec_parallel` (or `.rspec`)
|
157
|
+
Add the following to your `.rspec_parallel` (or `.rspec`), but can also be used via `--test-options='--format x'`:
|
158
158
|
|
159
159
|
--format progress
|
160
160
|
--format ParallelTests::RSpec::SummaryLogger --out tmp/spec_summary.log
|
@@ -168,7 +168,7 @@ Produce pasteable command-line snippets for each failed example. For example:
|
|
168
168
|
rspec /path/to/my_spec.rb:123 # should do something
|
169
169
|
```
|
170
170
|
|
171
|
-
Add to `.rspec_parallel` or
|
171
|
+
Add the following to your `.rspec_parallel` (or `.rspec`), but can also be used via `--test-options='--format x'`:
|
172
172
|
|
173
173
|
--format progress
|
174
174
|
--format ParallelTests::RSpec::FailuresLogger --out tmp/failing_specs.log
|
@@ -188,7 +188,7 @@ Prints a single line for starting and finishing each example, to see what is cur
|
|
188
188
|
[14402] [1] [PASSED] Bar bar
|
189
189
|
```
|
190
190
|
|
191
|
-
Add to `.rspec_parallel` or
|
191
|
+
Add the following to your `.rspec_parallel` (or `.rspec`), but can also be used via `--test-options='--format x'`:
|
192
192
|
|
193
193
|
--format ParallelTests::RSpec::VerboseLogger
|
194
194
|
|
@@ -206,6 +206,8 @@ Or add the formatter to the `parallel:` profile of your `cucumber.yml`:
|
|
206
206
|
|
207
207
|
parallel: --format progress --format ParallelTests::Cucumber::FailuresLogger --out tmp/cucumber_failures.log
|
208
208
|
|
209
|
+
but can also be used via `--test-options='--format x'`:
|
210
|
+
|
209
211
|
Note if your `cucumber.yml` default profile uses `<%= std_opts %>` you may need to insert this as follows `parallel: <%= std_opts %> --format progress...`
|
210
212
|
|
211
213
|
To rerun failures:
|
@@ -256,7 +258,8 @@ Options are:
|
|
256
258
|
--failure-exit-code INT Specify the exit code to use when tests fail
|
257
259
|
--specify-groups SPECS Use 'specify-groups' if you want to specify multiple specs running in multiple
|
258
260
|
processes in a specific formation. Commas indicate specs in the same process,
|
259
|
-
pipes indicate specs in a new process.
|
261
|
+
pipes indicate specs in a new process. If SPECS is a `-` the value for this
|
262
|
+
option is read from STDIN instead. Cannot use with --single, --isolate, or
|
260
263
|
--isolate-n. Ex.
|
261
264
|
$ parallel_tests -n 3 . --specify-groups '1_spec.rb,2_spec.rb|3_spec.rb'
|
262
265
|
Process 1 will contain 1_spec.rb and 2_spec.rb
|
@@ -335,12 +338,7 @@ TIPS
|
|
335
338
|
e.g. `config.cache_store = ..., namespace: "test_#{ENV['TEST_ENV_NUMBER']}"`
|
336
339
|
- Debug errors that only happen with multiple files using `--verbose` and [cleanser](https://github.com/grosser/cleanser)
|
337
340
|
- `export PARALLEL_TEST_PROCESSORS=13` to override default processor count
|
338
|
-
- `export
|
339
|
-
|
340
|
-
### Added
|
341
|
-
|
342
|
-
PARALLEL_TEST_MULTIPLY_PROCESSES
|
343
|
-
=.5` to override default processor multiplier
|
341
|
+
- `export PARALLEL_TEST_MULTIPLY_PROCESSES=.5` to override default processor multiplier
|
344
342
|
- Shell alias: `alias prspec='parallel_rspec -m 2 --'`
|
345
343
|
- [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.
|
346
344
|
- `--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
@@ -254,7 +254,8 @@ module ParallelTests
|
|
254
254
|
<<~TEXT.rstrip.split("\n").join("\n#{newline_padding}")
|
255
255
|
Use 'specify-groups' if you want to specify multiple specs running in multiple
|
256
256
|
processes in a specific formation. Commas indicate specs in the same process,
|
257
|
-
pipes indicate specs in a new process.
|
257
|
+
pipes indicate specs in a new process. If SPECS is a '-' the value for this
|
258
|
+
option is read from STDIN instead. Cannot use with --single, --isolate, or
|
258
259
|
--isolate-n. Ex.
|
259
260
|
$ parallel_tests -n 3 . --specify-groups '1_spec.rb,2_spec.rb|3_spec.rb'
|
260
261
|
Process 1 will contain 1_spec.rb and 2_spec.rb
|
@@ -48,8 +48,15 @@ module ParallelTests
|
|
48
48
|
|
49
49
|
private
|
50
50
|
|
51
|
+
def specified_groups(options)
|
52
|
+
groups = options[:specify_groups]
|
53
|
+
return groups if groups != '-'
|
54
|
+
|
55
|
+
$stdin.read.chomp
|
56
|
+
end
|
57
|
+
|
51
58
|
def specify_groups(items, num_groups, options, groups)
|
52
|
-
specify_test_process_groups = options
|
59
|
+
specify_test_process_groups = specified_groups(options).split('|')
|
53
60
|
if specify_test_process_groups.count > num_groups
|
54
61
|
raise 'Number of processes separated by pipe must be less than or equal to the total number of processes'
|
55
62
|
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: 5.0
|
4
|
+
version: 5.2.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: 2025-
|
11
|
+
date: 2025-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|
@@ -69,9 +69,9 @@ licenses:
|
|
69
69
|
- MIT
|
70
70
|
metadata:
|
71
71
|
bug_tracker_uri: https://github.com/grosser/parallel_tests/issues
|
72
|
-
changelog_uri: https://github.com/grosser/parallel_tests/blob/v5.0
|
73
|
-
documentation_uri: https://github.com/grosser/parallel_tests/blob/v5.0
|
74
|
-
source_code_uri: https://github.com/grosser/parallel_tests/tree/v5.0
|
72
|
+
changelog_uri: https://github.com/grosser/parallel_tests/blob/v5.2.0/CHANGELOG.md
|
73
|
+
documentation_uri: https://github.com/grosser/parallel_tests/blob/v5.2.0/Readme.md
|
74
|
+
source_code_uri: https://github.com/grosser/parallel_tests/tree/v5.2.0
|
75
75
|
wiki_uri: https://github.com/grosser/parallel_tests/wiki
|
76
76
|
rubygems_mfa_required: 'true'
|
77
77
|
post_install_message:
|
@@ -82,7 +82,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
82
82
|
requirements:
|
83
83
|
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: 3.
|
85
|
+
version: 3.1.0
|
86
86
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - ">="
|