parallel_tests 4.2.1 → 4.2.2
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 +3 -1
- data/lib/parallel_tests/cli.rb +9 -2
- data/lib/parallel_tests/rspec/failures_logger.rb +5 -13
- data/lib/parallel_tests/rspec/logger_base.rb +0 -2
- data/lib/parallel_tests/rspec/runtime_logger.rb +3 -4
- data/lib/parallel_tests/rspec/summary_logger.rb +1 -1
- data/lib/parallel_tests/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8669ce686a0c750d7bb0cbcab2f78ddd1d2431bcb5eb3eeea3a1a9050efe345e
|
4
|
+
data.tar.gz: a7f4d4148379cee9f80a820b72ce04e91eaf8df697cc9db8c2d530225e519f67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49a18035b13cb9d5665d73eec21bcc0749ae09b1488d05dc86bfc2516a6303b8e95919ec73ffc648d1aa7f5be373b1c70e8691d69719aaff79c382879db2c6c5
|
7
|
+
data.tar.gz: 5f0c59c7e8ba42150396e48cf31d437b0b9ce15b20c4554ae23072e00d3b9a8b48de41fd102f17275ca1015e151482b691159d6d10cebe9139106ad8183f2828
|
data/Readme.md
CHANGED
@@ -228,7 +228,9 @@ Options are:
|
|
228
228
|
Process 1 will contain 1_spec.rb and 2_spec.rb
|
229
229
|
Process 2 will contain 3_spec.rb
|
230
230
|
Process 3 will contain all other specs
|
231
|
-
--only-group INT[,INT]
|
231
|
+
--only-group INT[,INT] Only run the given group numbers. Note that this will force the 'filesize'
|
232
|
+
grouping strategy (even when the runtime log is present) unless you explicitly
|
233
|
+
set it otherwise via the '-group-by' flag.
|
232
234
|
-e, --exec [COMMAND] execute this code parallel and with ENV['TEST_ENV_NUMBER']
|
233
235
|
-o, --test-options '[OPTIONS]' execute test commands with those options
|
234
236
|
-t, --type [TYPE] test(default) / rspec / cucumber / spinach
|
data/lib/parallel_tests/cli.rb
CHANGED
@@ -244,7 +244,14 @@ module ParallelTests
|
|
244
244
|
TEXT
|
245
245
|
) { |groups| options[:specify_groups] = groups }
|
246
246
|
|
247
|
-
opts.on(
|
247
|
+
opts.on(
|
248
|
+
"--only-group INT[,INT]",
|
249
|
+
Array,
|
250
|
+
<<~TEXT.rstrip.split("\n").join("\n#{newline_padding}")
|
251
|
+
Only run the given group numbers.
|
252
|
+
Changes `--group-by` default to 'filesize'.
|
253
|
+
TEXT
|
254
|
+
) { |groups| options[:only_group] = groups.map(&:to_i) }
|
248
255
|
|
249
256
|
opts.on("-e", "--exec [COMMAND]", "execute this code parallel and with ENV['TEST_ENV_NUMBER']") { |arg| options[:execute] = Shellwords.shellsplit(arg) }
|
250
257
|
opts.on("-o", "--test-options '[OPTIONS]'", "execute test commands with those options") { |arg| options[:test_options] = Shellwords.shellsplit(arg) }
|
@@ -258,7 +265,7 @@ module ParallelTests
|
|
258
265
|
"--suffix [PATTERN]",
|
259
266
|
<<~TEXT.rstrip.split("\n").join("\n#{newline_padding}")
|
260
267
|
override built in test file pattern (should match suffix):
|
261
|
-
'_spec
|
268
|
+
'_spec.rb$' - matches rspec files
|
262
269
|
'_(test|spec).rb$' - matches test or spec files
|
263
270
|
TEXT
|
264
271
|
) { |pattern| options[:suffix] = /#{pattern}/ }
|
@@ -3,22 +3,14 @@ require 'parallel_tests/rspec/logger_base'
|
|
3
3
|
require 'parallel_tests/rspec/runner'
|
4
4
|
|
5
5
|
class ParallelTests::RSpec::FailuresLogger < ParallelTests::RSpec::LoggerBase
|
6
|
-
|
7
|
-
def dump_failures(*args); end
|
8
|
-
else
|
9
|
-
RSpec::Core::Formatters.register self, :dump_summary
|
10
|
-
end
|
6
|
+
RSpec::Core::Formatters.register(self, :dump_summary)
|
11
7
|
|
12
8
|
def dump_summary(*args)
|
13
9
|
lock_output do
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
notification
|
18
|
-
unless notification.failed_examples.empty?
|
19
|
-
colorizer = ::RSpec::Core::Formatters::ConsoleCodes
|
20
|
-
output.puts notification.colorized_rerun_commands(colorizer)
|
21
|
-
end
|
10
|
+
notification = args.first
|
11
|
+
unless notification.failed_examples.empty?
|
12
|
+
colorizer = ::RSpec::Core::Formatters::ConsoleCodes
|
13
|
+
output.puts notification.colorized_rerun_commands(colorizer)
|
22
14
|
end
|
23
15
|
end
|
24
16
|
@output.flush
|
@@ -9,7 +9,7 @@ class ParallelTests::RSpec::RuntimeLogger < ParallelTests::RSpec::LoggerBase
|
|
9
9
|
@group_nesting = 0
|
10
10
|
end
|
11
11
|
|
12
|
-
RSpec::Core::Formatters.register
|
12
|
+
RSpec::Core::Formatters.register(self, :example_group_started, :example_group_finished, :start_dump)
|
13
13
|
|
14
14
|
def example_group_started(example_group)
|
15
15
|
@time = ParallelTests.now if @group_nesting == 0
|
@@ -20,8 +20,7 @@ class ParallelTests::RSpec::RuntimeLogger < ParallelTests::RSpec::LoggerBase
|
|
20
20
|
def example_group_finished(notification)
|
21
21
|
@group_nesting -= 1
|
22
22
|
if @group_nesting == 0
|
23
|
-
|
24
|
-
@example_times[path] += ParallelTests.now - @time
|
23
|
+
@example_times[notification.group.file_path] += ParallelTests.now - @time
|
25
24
|
end
|
26
25
|
super if defined?(super)
|
27
26
|
end
|
@@ -39,7 +38,7 @@ class ParallelTests::RSpec::RuntimeLogger < ParallelTests::RSpec::LoggerBase
|
|
39
38
|
lock_output do
|
40
39
|
@example_times.each do |file, time|
|
41
40
|
relative_path = file.sub(%r{^#{Regexp.escape Dir.pwd}/}, '').sub(%r{^\./}, "")
|
42
|
-
@output.puts "#{relative_path}:#{time
|
41
|
+
@output.puts "#{relative_path}:#{[time, 0].max}"
|
43
42
|
end
|
44
43
|
end
|
45
44
|
@output.flush
|
@@ -2,7 +2,7 @@
|
|
2
2
|
require 'parallel_tests/rspec/failures_logger'
|
3
3
|
|
4
4
|
class ParallelTests::RSpec::SummaryLogger < ParallelTests::RSpec::LoggerBase
|
5
|
-
RSpec::Core::Formatters.register
|
5
|
+
RSpec::Core::Formatters.register(self, :dump_failures)
|
6
6
|
|
7
7
|
def dump_failures(*args)
|
8
8
|
lock_output { super }
|
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: 4.2.
|
4
|
+
version: 4.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|
@@ -68,8 +68,8 @@ licenses:
|
|
68
68
|
- MIT
|
69
69
|
metadata:
|
70
70
|
bug_tracker_uri: https://github.com/grosser/parallel_tests/issues
|
71
|
-
documentation_uri: https://github.com/grosser/parallel_tests/blob/v4.2.
|
72
|
-
source_code_uri: https://github.com/grosser/parallel_tests/tree/v4.2.
|
71
|
+
documentation_uri: https://github.com/grosser/parallel_tests/blob/v4.2.2/Readme.md
|
72
|
+
source_code_uri: https://github.com/grosser/parallel_tests/tree/v4.2.2
|
73
73
|
wiki_uri: https://github.com/grosser/parallel_tests/wiki
|
74
74
|
post_install_message:
|
75
75
|
rdoc_options: []
|