parallel_tests 2.6.0 → 2.7.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/lib/parallel_tests/cli.rb +18 -1
- 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: 1585f19962c54d1fd36e9ad3408da061ecc38fc9
|
4
|
+
data.tar.gz: 20f825eb1ff02a6f39788a4913181e7c4c94597e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca6a18cf92d323a105d8ce304e8106edff9c59753c88bd30fac5d16daf95ec61406963797962c643d34147291d1d20aca40bc4fd7907e2ca723a61d48dcedc58
|
7
|
+
data.tar.gz: 9ccf49b6ad98dac027cc2bd4494d17d4fb531a02b3863071f1f45ef94110c78241240180979638a9b7a7af36f93568b32f9b3d3f93a9f12cb7b868c725c163ad
|
data/lib/parallel_tests/cli.rb
CHANGED
@@ -26,8 +26,14 @@ module ParallelTests
|
|
26
26
|
|
27
27
|
def execute_in_parallel(items, num_processes, options)
|
28
28
|
Tempfile.open 'parallel_tests-lock' do |lock|
|
29
|
-
|
29
|
+
progress_indicator = simulate_output_for_ci if options[:serialize_stdout]
|
30
|
+
|
31
|
+
Parallel.map(items, :in_threads => num_processes) do |item|
|
30
32
|
result = yield(item)
|
33
|
+
if progress_indicator && progress_indicator.alive?
|
34
|
+
progress_indicator.exit
|
35
|
+
puts
|
36
|
+
end
|
31
37
|
reprint_output(result, lock.path) if options[:serialize_stdout]
|
32
38
|
result
|
33
39
|
end
|
@@ -294,5 +300,16 @@ module ParallelTests
|
|
294
300
|
val = ENV["PARALLEL_TEST_FIRST_IS_1"]
|
295
301
|
['1', 'true'].include?(val)
|
296
302
|
end
|
303
|
+
|
304
|
+
# CI systems often fail when there is no output for a long time, so simulate some output
|
305
|
+
def simulate_output_for_ci
|
306
|
+
Thread.new do
|
307
|
+
interval = ENV.fetch('PARALLEL_TEST_HEARTBEAT_INTERVAL', 60).to_f
|
308
|
+
loop do
|
309
|
+
sleep interval
|
310
|
+
print '.'
|
311
|
+
end
|
312
|
+
end
|
313
|
+
end
|
297
314
|
end
|
298
315
|
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.7.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: 2016-
|
11
|
+
date: 2016-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
81
|
version: '0'
|
82
82
|
requirements: []
|
83
83
|
rubyforge_project:
|
84
|
-
rubygems_version: 2.
|
84
|
+
rubygems_version: 2.5.1
|
85
85
|
signing_key:
|
86
86
|
specification_version: 4
|
87
87
|
summary: Run Test::Unit / RSpec / Cucumber / Spinach in parallel
|