parallel_tests 5.4.0 → 5.6.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 +6 -6
- data/lib/parallel_tests/cli.rb +1 -1
- data/lib/parallel_tests/test/runner.rb +10 -1
- data/lib/parallel_tests/test/runtime_logger.rb +3 -1
- data/lib/parallel_tests/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 34db466ecb3d4a72ee1d4f44ebb67bd4676a93df745163aa0fb2cd981365ec1a
|
|
4
|
+
data.tar.gz: e90ab9fdf7af7a731e5586036dc0b305ae37464caa77e481736ff1919754d7fa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a42a001f0d39194e71db4900d9b979bbb6ccfd7ec947bf6b0d9e68d351badc1f4b453228a5e22a9ab56783ae1ed16f3bc2911f93c68aa9eb82e945ef0896bbbf
|
|
7
|
+
data.tar.gz: 5872ee0b123aed1e52ef43f5eb1785c9bb653351be215c2b00ff2665e2e5debab7b27b6f8a00f6d2b8af9f23080ea0d976b00b2ffb056d1c5eb8026f570bc7b1
|
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
|
**Step 1**: Use these loggers (see below) to record test runtime
|
|
131
131
|
|
|
132
|
-
**Step 2**: The next test run will use the recorded test runtimes (use `--runtime-log <file>` if you
|
|
132
|
+
**Step 2**: The next test run will use the recorded test runtimes (use `--runtime-log <file>` if you wrote to a location different from default)
|
|
133
133
|
|
|
134
134
|
**Step 3**: Automate upload/download of test runtime from your CI system [example](https://github.com/grosser/parallel_rails_example/blob/master/.github/workflows/test.yml) (chunks need to be combined, an alternative is [amend](https://github.com/grosser/amend))
|
|
135
135
|
|
|
@@ -140,17 +140,17 @@ Rspec: Add to your `.rspec_parallel` (or `.rspec`), but can also be used via `--
|
|
|
140
140
|
--format progress
|
|
141
141
|
--format ParallelTests::RSpec::RuntimeLogger --out tmp/parallel_runtime_rspec.log
|
|
142
142
|
|
|
143
|
-
To use a custom logfile location (default: `tmp/parallel_runtime_rspec.log`), use the CLI: `parallel_test spec -t rspec --runtime-log my.log`
|
|
144
|
-
|
|
145
143
|
### Minitest
|
|
146
144
|
|
|
147
145
|
Add to your `test_helper.rb`:
|
|
148
146
|
```ruby
|
|
149
|
-
|
|
147
|
+
if ENV['RECORD_RUNTIME']
|
|
148
|
+
require 'parallel_tests/test/runtime_logger'
|
|
149
|
+
# ParallelTests::Test::RuntimeLogger.logfile = "tmp/parallel_runtime_test.log" # where to write it
|
|
150
|
+
end
|
|
150
151
|
```
|
|
151
152
|
|
|
152
|
-
results will be logged
|
|
153
|
-
so it is not always required or overwritten.
|
|
153
|
+
results will be logged when `RECORD_RUNTIME` is set, so it is not always required or overwritten.
|
|
154
154
|
|
|
155
155
|
Loggers
|
|
156
156
|
=======
|
data/lib/parallel_tests/cli.rb
CHANGED
|
@@ -436,7 +436,7 @@ module ParallelTests
|
|
|
436
436
|
|
|
437
437
|
def report_time_taken(&block)
|
|
438
438
|
seconds = ParallelTests.delta(&block).to_i
|
|
439
|
-
puts "\nTook #{seconds}
|
|
439
|
+
puts "\nTook #{pluralize(seconds, 'second')}#{detailed_duration(seconds)}"
|
|
440
440
|
end
|
|
441
441
|
|
|
442
442
|
def detailed_duration(seconds)
|
|
@@ -110,7 +110,16 @@ module ParallelTests
|
|
|
110
110
|
capture_output(io, env, options)
|
|
111
111
|
end
|
|
112
112
|
ParallelTests.pids.delete(pid) if pid
|
|
113
|
-
|
|
113
|
+
|
|
114
|
+
status = $?
|
|
115
|
+
exitstatus = if status.exitstatus
|
|
116
|
+
status.exitstatus
|
|
117
|
+
elsif status.termsig
|
|
118
|
+
status.termsig + 128
|
|
119
|
+
else
|
|
120
|
+
1
|
|
121
|
+
end
|
|
122
|
+
|
|
114
123
|
seed = output[/seed (\d+)/, 1]
|
|
115
124
|
|
|
116
125
|
output = "#{Shellwords.shelljoin(cmd)}\n#{output}" if report_process_command?(options) && options[:serialize_stdout]
|
|
@@ -8,6 +8,8 @@ module ParallelTests
|
|
|
8
8
|
@@prepared = false
|
|
9
9
|
|
|
10
10
|
class << self
|
|
11
|
+
attr_writer :logfile
|
|
12
|
+
|
|
11
13
|
def log_test_run(test)
|
|
12
14
|
prepare
|
|
13
15
|
|
|
@@ -66,7 +68,7 @@ module ParallelTests
|
|
|
66
68
|
end
|
|
67
69
|
|
|
68
70
|
def logfile
|
|
69
|
-
ParallelTests::Test::Runner.runtime_log
|
|
71
|
+
@logfile || ParallelTests::Test::Runner.runtime_log
|
|
70
72
|
end
|
|
71
73
|
end
|
|
72
74
|
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.
|
|
4
|
+
version: 5.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:
|
|
11
|
+
date: 2026-02-05 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.
|
|
73
|
-
documentation_uri: https://github.com/grosser/parallel_tests/blob/v5.
|
|
74
|
-
source_code_uri: https://github.com/grosser/parallel_tests/tree/v5.
|
|
72
|
+
changelog_uri: https://github.com/grosser/parallel_tests/blob/v5.6.0/CHANGELOG.md
|
|
73
|
+
documentation_uri: https://github.com/grosser/parallel_tests/blob/v5.6.0/Readme.md
|
|
74
|
+
source_code_uri: https://github.com/grosser/parallel_tests/tree/v5.6.0
|
|
75
75
|
wiki_uri: https://github.com/grosser/parallel_tests/wiki
|
|
76
76
|
rubygems_mfa_required: 'true'
|
|
77
77
|
post_install_message:
|