parallel_tests 4.6.0 → 4.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Readme.md +7 -7
- data/lib/parallel_tests/cli.rb +4 -4
- 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: a00430ce92cb7dbfe80737cb601f269f463d60cdf6652e8932398bce2386dc2b
|
4
|
+
data.tar.gz: 8638d842e945665c779e433b40b70775719a30839dc0a59476d1e7987df5ef1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6ced0d1c0d23f42c14992977493f3712d8b60c6a0a933b2b0cfcd1ba413119dbe3084853f6915471946535e26399b0132fa8f7520bb002131941da09553eb6c
|
7
|
+
data.tar.gz: 5d2d5a3d8b400e337345a0e0e13ae5e94a4a1a8a4c5ef6fa3132091c1d8f66f6dabddda1dd0f9f880adade03345d9fc84bed44a7b22432490e759094b8b77d9d
|
data/Readme.md
CHANGED
@@ -61,17 +61,17 @@ test:
|
|
61
61
|
rake parallel:features # Cucumber
|
62
62
|
rake parallel:features-spinach # Spinach
|
63
63
|
|
64
|
-
rake parallel:test[1] --> force 1 CPU --> 86 seconds
|
64
|
+
rake "parallel:test[1]" --> force 1 CPU --> 86 seconds
|
65
65
|
rake parallel:test --> got 2 CPUs? --> 47 seconds
|
66
66
|
rake parallel:test --> got 4 CPUs? --> 26 seconds
|
67
67
|
...
|
68
68
|
|
69
69
|
Test by pattern with Regex (e.g. use one integration server per subfolder / see if you broke any 'user'-related tests)
|
70
70
|
|
71
|
-
rake parallel:test[^test/unit] # every test file in test/unit folder
|
72
|
-
rake parallel:test[user] # run users_controller + user_helper + user tests
|
73
|
-
rake parallel:test['user|product'] # run user and product related tests
|
74
|
-
rake parallel:spec['spec\/(?!features)'] # run RSpec tests except the tests in spec/features
|
71
|
+
rake "parallel:test[^test/unit]" # every test file in test/unit folder
|
72
|
+
rake "parallel:test[user]" # run users_controller + user_helper + user tests
|
73
|
+
rake "parallel:test['user|product']" # run user and product related tests
|
74
|
+
rake "parallel:spec['spec\/(?!features)']" # run RSpec tests except the tests in spec/features
|
75
75
|
|
76
76
|
|
77
77
|
### Example output
|
@@ -87,9 +87,9 @@ Test by pattern with Regex (e.g. use one integration server per subfolder / see
|
|
87
87
|
```Bash
|
88
88
|
RAILS_ENV=test parallel_test -e "rake my:custom:task"
|
89
89
|
# or
|
90
|
-
rake parallel:rake[my:custom:task]
|
90
|
+
rake "parallel:rake[my:custom:task]"
|
91
91
|
# limited parallelism
|
92
|
-
rake parallel:rake[my:custom:task,2]
|
92
|
+
rake "parallel:rake[my:custom:task,2]"
|
93
93
|
```
|
94
94
|
|
95
95
|
|
data/lib/parallel_tests/cli.rb
CHANGED
@@ -57,8 +57,8 @@ module ParallelTests
|
|
57
57
|
Tempfile.open 'parallel_tests-lock' do |lock|
|
58
58
|
ParallelTests.with_pid_file do
|
59
59
|
simulate_output_for_ci options[:serialize_stdout] do
|
60
|
-
Parallel.
|
61
|
-
result = yield(item)
|
60
|
+
Parallel.map_with_index(items, in_threads: num_processes) do |item, index|
|
61
|
+
result = yield(item, index)
|
62
62
|
reprint_output(result, lock.path) if options[:serialize_stdout]
|
63
63
|
ParallelTests.stop_all_processes if options[:fail_fast] && result[:exit_status] != 0
|
64
64
|
result
|
@@ -81,8 +81,8 @@ module ParallelTests
|
|
81
81
|
end
|
82
82
|
|
83
83
|
report_number_of_tests(groups) unless options[:quiet]
|
84
|
-
test_results = execute_in_parallel(groups, groups.size, options) do |group|
|
85
|
-
run_tests(group,
|
84
|
+
test_results = execute_in_parallel(groups, groups.size, options) do |group, index|
|
85
|
+
run_tests(group, index, num_processes, options)
|
86
86
|
end
|
87
87
|
report_results(test_results, options) unless options[:quiet]
|
88
88
|
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: 4.6.
|
4
|
+
version: 4.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03
|
11
|
+
date: 2024-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|
@@ -69,8 +69,8 @@ licenses:
|
|
69
69
|
- MIT
|
70
70
|
metadata:
|
71
71
|
bug_tracker_uri: https://github.com/grosser/parallel_tests/issues
|
72
|
-
documentation_uri: https://github.com/grosser/parallel_tests/blob/v4.6.
|
73
|
-
source_code_uri: https://github.com/grosser/parallel_tests/tree/v4.6.
|
72
|
+
documentation_uri: https://github.com/grosser/parallel_tests/blob/v4.6.1/Readme.md
|
73
|
+
source_code_uri: https://github.com/grosser/parallel_tests/tree/v4.6.1
|
74
74
|
wiki_uri: https://github.com/grosser/parallel_tests/wiki
|
75
75
|
post_install_message:
|
76
76
|
rdoc_options: []
|