ci-queue 0.9.2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ci-queue.gemspec +1 -1
- data/lib/ci/queue/version.rb +1 -1
- data/lib/minitest/queue.rb +6 -1
- data/lib/minitest/queue/runner.rb +3 -2
- data/lib/minitest/reporters/bisect_reporter.rb +16 -0
- data/lib/minitest/reporters/failure_formatter.rb +2 -2
- data/lib/minitest/reporters/order_reporter.rb +1 -1
- data/lib/minitest/reporters/queue_reporter.rb +1 -1
- data/lib/minitest/reporters/redis_reporter.rb +2 -2
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 652339a43dd06f487b03a5ffb074d5f1fb5291e7
|
4
|
+
data.tar.gz: 8ae7eae228a8b630934793402cf9398ee7c7310a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d432b69e34fd503a6cc6a334637b28382e5e8617c747f992b1399a8cba56e688d829d424627f2c40c8a847d0853ad9fde0812ff0643a94969f72f94bf3fc591
|
7
|
+
data.tar.gz: f55f4e1134e40542535c32dc30c16b80af59d053b09682b69cba149e6b2161d31f3c6613dced48cbdb476f51fdd51daf590cd81b4d270aab98555626758acb48
|
data/ci-queue.gemspec
CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
|
31
31
|
spec.add_development_dependency 'bundler', '~> 1.13'
|
32
32
|
spec.add_development_dependency 'rake', "~> 10.0"
|
33
|
-
spec.add_development_dependency 'minitest', '~> 5.
|
33
|
+
spec.add_development_dependency 'minitest', ENV.fetch('MINITEST_VERSION', '~> 5.11')
|
34
34
|
spec.add_development_dependency 'rspec', '~> 3.7.0'
|
35
35
|
spec.add_development_dependency 'redis', '~> 3.3'
|
36
36
|
spec.add_development_dependency 'simplecov', '~> 0.12'
|
data/lib/ci/queue/version.rb
CHANGED
data/lib/minitest/queue.rb
CHANGED
@@ -116,4 +116,9 @@ module Minitest
|
|
116
116
|
end
|
117
117
|
|
118
118
|
MiniTest.singleton_class.prepend(MiniTest::Queue)
|
119
|
-
MiniTest::
|
119
|
+
if defined? MiniTest::Result
|
120
|
+
MiniTest::Result.prepend(MiniTest::Requeueing)
|
121
|
+
else
|
122
|
+
MiniTest::Test.prepend(MiniTest::Requeueing)
|
123
|
+
MiniTest::Test.send(:alias_method, :klass, :class)
|
124
|
+
end
|
@@ -2,6 +2,7 @@ require 'optparse'
|
|
2
2
|
require 'minitest/queue'
|
3
3
|
require 'ci/queue'
|
4
4
|
require 'digest/md5'
|
5
|
+
require 'minitest/reporters/bisect_reporter'
|
5
6
|
|
6
7
|
module Minitest
|
7
8
|
module Queue
|
@@ -61,7 +62,7 @@ module Minitest
|
|
61
62
|
step("Testing the failing test in isolation")
|
62
63
|
unless run_tests_in_fork(queue.failing_test)
|
63
64
|
puts reopen_previous_step
|
64
|
-
puts red("The test fail when
|
65
|
+
puts red("The test fail when ran alone, no need to bisect.")
|
65
66
|
exit! 0
|
66
67
|
end
|
67
68
|
|
@@ -130,7 +131,7 @@ module Minitest
|
|
130
131
|
def run_tests_in_fork(queue)
|
131
132
|
child_pid = fork do
|
132
133
|
Minitest.queue = queue
|
133
|
-
Minitest::Reporters.use!([Minitest::Reporters::
|
134
|
+
Minitest::Reporters.use!([Minitest::Reporters::BisectReporter.new])
|
134
135
|
exit # let minitest excute its at_exit
|
135
136
|
end
|
136
137
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'minitest/reporters'
|
2
|
+
|
3
|
+
module Minitest
|
4
|
+
module Reporters
|
5
|
+
class BisectReporter < BaseReporter
|
6
|
+
include RelativePosition
|
7
|
+
|
8
|
+
def record(test)
|
9
|
+
super
|
10
|
+
test_name = "#{test.klass}##{test.name}"
|
11
|
+
print pad_test(test_name)
|
12
|
+
puts pad_mark(result(test).to_s.upcase)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -20,7 +20,7 @@ module Minitest
|
|
20
20
|
|
21
21
|
def to_h
|
22
22
|
{
|
23
|
-
test_and_module_name: "#{test.
|
23
|
+
test_and_module_name: "#{test.klass}##{test.name}",
|
24
24
|
test_name: test.name,
|
25
25
|
output: to_s,
|
26
26
|
}
|
@@ -31,7 +31,7 @@ module Minitest
|
|
31
31
|
attr_reader :test
|
32
32
|
|
33
33
|
def header
|
34
|
-
"#{red(status)} #{test.
|
34
|
+
"#{red(status)} #{test.klass}##{test.name}"
|
35
35
|
end
|
36
36
|
|
37
37
|
def status
|
@@ -217,9 +217,9 @@ module Minitest
|
|
217
217
|
|
218
218
|
redis.multi do
|
219
219
|
if (test.failure || test.error?) && !test.skipped?
|
220
|
-
redis.hset(key('error-reports'), "#{test.
|
220
|
+
redis.hset(key('error-reports'), "#{test.klass}##{test.name}", dump(test))
|
221
221
|
else
|
222
|
-
redis.hdel(key('error-reports'), "#{test.
|
222
|
+
redis.hdel(key('error-reports'), "#{test.klass}##{test.name}")
|
223
223
|
end
|
224
224
|
COUNTERS.each do |counter|
|
225
225
|
redis.hset(key(counter), worker_id, send(counter))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ci-queue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ansi
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 5.
|
61
|
+
version: '5.11'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 5.
|
68
|
+
version: '5.11'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -189,6 +189,7 @@ files:
|
|
189
189
|
- lib/ci/queue/version.rb
|
190
190
|
- lib/minitest/queue.rb
|
191
191
|
- lib/minitest/queue/runner.rb
|
192
|
+
- lib/minitest/reporters/bisect_reporter.rb
|
192
193
|
- lib/minitest/reporters/failure_formatter.rb
|
193
194
|
- lib/minitest/reporters/order_reporter.rb
|
194
195
|
- lib/minitest/reporters/queue_reporter.rb
|