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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c56cc78cb306fb67c398a2cdf41b5a9d7d594d87
4
- data.tar.gz: d63fb0d78ec9fe9eeb04bc2bc60a1ab6aeeab77d
3
+ metadata.gz: 652339a43dd06f487b03a5ffb074d5f1fb5291e7
4
+ data.tar.gz: 8ae7eae228a8b630934793402cf9398ee7c7310a
5
5
  SHA512:
6
- metadata.gz: 4ef344549d3bb3e75bb01f0e9bae693b2ed635eedcc31f5043383de2c8775e662c1822ba740435b174e0f9ebce3346b97ccc203a44ce433ab922ab9796d2a91f
7
- data.tar.gz: 0b6ec24e92bf4ec95d6bd68a20e64efab06dcf5109bb9c7b3ab1ad2f8632cc8907865dbaacebff891606f817d0101376281ba5549d152b8acfc3ebfe537eeea9
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.9.1'
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'
@@ -1,6 +1,6 @@
1
1
  module CI
2
2
  module Queue
3
- VERSION = '0.9.2'
3
+ VERSION = '0.10.0'
4
4
  DEV_SCRIPTS_ROOT = ::File.expand_path('../../../../../redis', __FILE__)
5
5
  RELEASE_SCRIPTS_ROOT = ::File.expand_path('../redis', __FILE__)
6
6
  end
@@ -116,4 +116,9 @@ module Minitest
116
116
  end
117
117
 
118
118
  MiniTest.singleton_class.prepend(MiniTest::Queue)
119
- MiniTest::Test.prepend(MiniTest::Requeueing)
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 run alone, no need to bisect.")
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::SpecReporter.new])
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.class}##{test.name}",
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.class}##{test.name}"
34
+ "#{red(status)} #{test.klass}##{test.name}"
35
35
  end
36
36
 
37
37
  def status
@@ -13,7 +13,7 @@ class Minitest::Reporters::OrderReporter < Minitest::Reporters::BaseReporter
13
13
 
14
14
  def before_test(test)
15
15
  super
16
- @file.puts("#{test.class}##{test.name}")
16
+ @file.puts("#{test.klass}##{test.name}")
17
17
  end
18
18
 
19
19
  def report
@@ -36,7 +36,7 @@ module Minitest
36
36
  e = test.failure
37
37
 
38
38
  if test.requeued?
39
- "Requeued:\n#{test.class}##{test.name} [#{location(e)}]:\n#{e.message}"
39
+ "Requeued:\n#{test.klass}##{test.name} [#{location(e)}]:\n#{e.message}"
40
40
  else
41
41
  super
42
42
  end
@@ -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.class}##{test.name}", dump(test))
220
+ redis.hset(key('error-reports'), "#{test.klass}##{test.name}", dump(test))
221
221
  else
222
- redis.hdel(key('error-reports'), "#{test.class}##{test.name}")
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.9.2
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: 2017-12-05 00:00:00.000000000 Z
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.9.1
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.9.1
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