parallel_tests 2.27.1 → 2.28.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 +2 -0
- data/lib/parallel_tests/cli.rb +1 -0
- data/lib/parallel_tests/test/runner.rb +9 -3
- data/lib/parallel_tests/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6a3302bc606b106b21ad18230f4c44c0981890cf5e603ecd7a85f4a800766f6
|
4
|
+
data.tar.gz: c1269f9f6a3faba3d8220a360d2b050d49ccef83c14c83cf6a243a4dca7d245c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1e9ea15748222c5acc25f8a2fee413bed29e7dff207ff968b1ffe2cbe54bb221acca26c5c83abe5f0188a8f41226392fdf356be75a2e47573c18cc0c477b406
|
7
|
+
data.tar.gz: ea67c57a7037e57936ca818e79239bb42a8c18cdecd26cb6ac7496672073c3cca652e9f814227139a816676d721e5cbf8fb68fbb77da49138a5ce8426cbffce0
|
data/Readme.md
CHANGED
@@ -195,6 +195,7 @@ Options are:
|
|
195
195
|
|
196
196
|
-n [PROCESSES] How many processes to use, default: available CPUs
|
197
197
|
-p, --pattern [PATTERN] run tests matching this regex pattern
|
198
|
+
--exclude-pattern [PATTERN] exclude tests matching this regex pattern
|
198
199
|
--group-by [TYPE] group tests by:
|
199
200
|
found - order of finding files
|
200
201
|
steps - number of cucumber/spinach steps
|
@@ -373,6 +374,7 @@ inspired by [pivotal labs](https://blog.pivotal.io/labs/labs/parallelize-your-rs
|
|
373
374
|
- [David Rodríguez](https://github.com/deivid-rodriguez)
|
374
375
|
- [Justin Doody](https://github.com/justindoody)
|
375
376
|
- [Sandeep Singh](https://github.com/sandeepnagra)
|
377
|
+
- [Calaway](https://github.com/calaway)
|
376
378
|
|
377
379
|
[Michael Grosser](http://grosser.it)<br/>
|
378
380
|
michael@grosser.it<br/>
|
data/lib/parallel_tests/cli.rb
CHANGED
@@ -164,6 +164,7 @@ module ParallelTests
|
|
164
164
|
BANNER
|
165
165
|
opts.on("-n [PROCESSES]", Integer, "How many processes to use, default: available CPUs") { |n| options[:count] = n }
|
166
166
|
opts.on("-p", "--pattern [PATTERN]", "run tests matching this regex pattern") { |pattern| options[:pattern] = /#{pattern}/ }
|
167
|
+
opts.on("--exclude-pattern", "--exclude-pattern [PATTERN]", "exclude tests matching this regex pattern") { |pattern| options[:exclude_pattern] = /#{pattern}/ }
|
167
168
|
opts.on("--group-by [TYPE]", <<-TEXT.gsub(/^ /, '')
|
168
169
|
group tests by:
|
169
170
|
found - order of finding files
|
@@ -209,14 +209,20 @@ module ParallelTests
|
|
209
209
|
end
|
210
210
|
|
211
211
|
def find_tests(tests, options = {})
|
212
|
-
|
212
|
+
suffix_pattern = options[:suffix] || test_suffix
|
213
|
+
include_pattern = options[:pattern] || //
|
214
|
+
exclude_pattern = options[:exclude_pattern]
|
215
|
+
|
216
|
+
(tests || []).flat_map do |file_or_folder|
|
213
217
|
if File.directory?(file_or_folder)
|
214
218
|
files = files_in_folder(file_or_folder, options)
|
215
|
-
files.grep(
|
219
|
+
files = files.grep(suffix_pattern).grep(include_pattern)
|
220
|
+
files -= files.grep(exclude_pattern) if exclude_pattern
|
221
|
+
files
|
216
222
|
else
|
217
223
|
file_or_folder
|
218
224
|
end
|
219
|
-
end.
|
225
|
+
end.uniq
|
220
226
|
end
|
221
227
|
|
222
228
|
def files_in_folder(folder, options={})
|
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.28.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: 2019-
|
11
|
+
date: 2019-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|