parallel_tests 2.19.0 → 2.20.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 +3 -0
- data/lib/parallel_tests/cli.rb +1 -0
- data/lib/parallel_tests/test/runner.rb +8 -6
- data/lib/parallel_tests/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 126a6088de6cb41ed24578e9e0073cb397864193
|
4
|
+
data.tar.gz: 82c3b988b3ebb7fa769bd2875636f835738010e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a37bc96ddd7bf3609160abfc60b7a0617342ff17277f51c77ddd05e0dedac193f5c2830ac25900ac19cef1dc295faae633aca66e14935b90f2dee1533879ef4
|
7
|
+
data.tar.gz: '0878caabc9da6424645a72bd7bbc141aa91bce6cced4b6adbe0a10ce6a0a5ded372b677166f851bb05bee69b4b63b797bde40ae79bede47028606ddbfbc1d756'
|
data/Readme.md
CHANGED
@@ -213,6 +213,8 @@ Options are:
|
|
213
213
|
'_spec.rb$' - matches rspec files
|
214
214
|
'_(test|spec).rb$' - matches test or spec files
|
215
215
|
--serialize-stdout Serialize stdout output, nothing will be written until everything is done
|
216
|
+
--prefix-output-with-test-env-number
|
217
|
+
Prefixes test env number to the output when not using --serialize-stdout
|
216
218
|
--combine-stderr Combine stderr into stdout, useful in conjunction with --serialize-stdout
|
217
219
|
--non-parallel execute same commands but do not in parallel, needs --exec
|
218
220
|
--no-symlinks Do not traverse symbolic links to find test files
|
@@ -365,6 +367,7 @@ inspired by [pivotal labs](https://blog.pivotal.io/labs/labs/parallelize-your-rs
|
|
365
367
|
- [Alexandre Wilhelm](https://github.com/dogild)
|
366
368
|
- [Jerry](https://github.com/boblington)
|
367
369
|
- [Aleksei Gusev](https://github.com/hron)
|
370
|
+
- [Scott Olsen](https://github.com/scottolsen)
|
368
371
|
|
369
372
|
[Michael Grosser](http://grosser.it)<br/>
|
370
373
|
michael@grosser.it<br/>
|
data/lib/parallel_tests/cli.rb
CHANGED
@@ -204,6 +204,7 @@ module ParallelTests
|
|
204
204
|
TEXT
|
205
205
|
) { |pattern| options[:suffix] = /#{pattern}/ }
|
206
206
|
opts.on("--serialize-stdout", "Serialize stdout output, nothing will be written until everything is done") { options[:serialize_stdout] = true }
|
207
|
+
opts.on("--prefix-output-with-test-env-number", "Prefixes test env number to the output when not using --serialize-stdout") { options[:prefix_output_with_test_env_number] = true }
|
207
208
|
opts.on("--combine-stderr", "Combine stderr into stdout, useful in conjunction with --serialize-stdout") { options[:combine_stderr] = true }
|
208
209
|
opts.on("--non-parallel", "execute same commands but do not in parallel, needs --exec") { options[:non_parallel] = true }
|
209
210
|
opts.on("--no-symlinks", "Do not traverse symbolic links to find test files") { options[:symlinks] = false }
|
@@ -80,15 +80,15 @@ module ParallelTests
|
|
80
80
|
|
81
81
|
puts cmd if options[:verbose]
|
82
82
|
|
83
|
-
execute_command_and_capture_output(env, cmd, options
|
83
|
+
execute_command_and_capture_output(env, cmd, options)
|
84
84
|
end
|
85
85
|
|
86
|
-
def execute_command_and_capture_output(env, cmd,
|
86
|
+
def execute_command_and_capture_output(env, cmd, options)
|
87
87
|
pid = nil
|
88
88
|
output = IO.popen(env, cmd) do |io|
|
89
89
|
pid = io.pid
|
90
90
|
ParallelTests.pids.add(pid)
|
91
|
-
capture_output(io,
|
91
|
+
capture_output(io, env, options)
|
92
92
|
end
|
93
93
|
ParallelTests.pids.delete(pid) if pid
|
94
94
|
exitstatus = $?.exitstatus
|
@@ -145,7 +145,7 @@ module ParallelTests
|
|
145
145
|
end
|
146
146
|
|
147
147
|
# read output of the process and print it in chunks
|
148
|
-
def capture_output(out,
|
148
|
+
def capture_output(out, env, options={})
|
149
149
|
result = ""
|
150
150
|
loop do
|
151
151
|
begin
|
@@ -154,8 +154,10 @@ module ParallelTests
|
|
154
154
|
read = read.force_encoding(Encoding.default_internal)
|
155
155
|
end
|
156
156
|
result << read
|
157
|
-
unless
|
158
|
-
|
157
|
+
unless options[:serialize_stdout]
|
158
|
+
message = read
|
159
|
+
message = "[TEST GROUP #{env['TEST_ENV_NUMBER']}] #{message}" if options[:prefix_output_with_test_env_number]
|
160
|
+
$stdout.print message
|
159
161
|
$stdout.flush
|
160
162
|
end
|
161
163
|
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: 2.
|
4
|
+
version: 2.20.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: 2018-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
82
|
version: '0'
|
83
83
|
requirements: []
|
84
84
|
rubyforge_project:
|
85
|
-
rubygems_version: 2.
|
85
|
+
rubygems_version: 2.6.14
|
86
86
|
signing_key:
|
87
87
|
specification_version: 4
|
88
88
|
summary: Run Test::Unit / RSpec / Cucumber / Spinach in parallel
|