minitest-bisect 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.rdoc +7 -0
- data/Rakefile +9 -7
- data/example-many/helper.rb +1 -1
- data/example/helper.rb +1 -1
- data/lib/minitest/bisect.rb +16 -9
- data/lib/minitest/find_minimal_combination.rb +2 -2
- data/test/minitest/test_bisect.rb +1 -1
- data/test/minitest/test_find_minimal_combination.rb +0 -1
- metadata +20 -8
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b52e433884ec629aed62043f342ebf6f21e1ec65
|
4
|
+
data.tar.gz: f90ecba8f0fde0d17d02cc20f3740e01fc005290
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cd4cc3115649a5bf7561dee93ee904e12e67beaf23ed45e3f2c095698a7446f8b86af271943c582ab80f7a95a13e50c97aba81b4879eeec22df8bc2a4928a2b
|
7
|
+
data.tar.gz: 083bdeab31eab71bcfa7a48842963ea3a4d8103a785b9373eee96ba65e8f0e86d55dad4065b0c40f5843efc6ee1f8ebe0ceb2e9b59e720775fb5e5b176e4d9e4
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/History.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -13,6 +13,7 @@ Hoe.spec "minitest-bisect" do
|
|
13
13
|
developer "Ryan Davis", "ryand-ruby@zenspider.com"
|
14
14
|
license "MIT"
|
15
15
|
|
16
|
+
dependency "rake", "> 0", :development
|
16
17
|
dependency "minitest-server", "~> 1.0"
|
17
18
|
end
|
18
19
|
|
@@ -28,11 +29,12 @@ def banner text
|
|
28
29
|
puts "# #{text} ::"
|
29
30
|
puts "#" * 70
|
30
31
|
puts
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
32
|
+
|
33
|
+
return if ENV["SLEEP"] == "0"
|
34
|
+
|
35
|
+
print "Press return to continue "
|
36
|
+
$stdin.gets
|
37
|
+
puts
|
36
38
|
end
|
37
39
|
|
38
40
|
def run cmd
|
@@ -44,7 +46,7 @@ def req glob
|
|
44
46
|
end
|
45
47
|
|
46
48
|
task :repro do
|
47
|
-
unless ENV.
|
49
|
+
unless ENV.key? "SLEEP" then
|
48
50
|
warn "NOTE: Defaulting to sleeping 0.01 seconds per test."
|
49
51
|
warn "NOTE: Use SLEEP=0 to disable or any other value to simulate your tests."
|
50
52
|
end
|
@@ -59,7 +61,7 @@ task :repro do
|
|
59
61
|
end
|
60
62
|
|
61
63
|
task :many do
|
62
|
-
unless ENV.
|
64
|
+
unless ENV.key? "SLEEP" then
|
63
65
|
warn "NOTE: Defaulting to sleeping 0.01 seconds per test."
|
64
66
|
warn "NOTE: Use SLEEP=0 to disable or any other value to simulate your tests."
|
65
67
|
end
|
data/example-many/helper.rb
CHANGED
data/example/helper.rb
CHANGED
data/lib/minitest/bisect.rb
CHANGED
@@ -1,11 +1,18 @@
|
|
1
1
|
require "minitest/find_minimal_combination"
|
2
2
|
require "minitest/server"
|
3
3
|
require "shellwords"
|
4
|
+
require "rbconfig"
|
4
5
|
|
5
6
|
class Minitest::Bisect
|
6
|
-
VERSION = "1.2.
|
7
|
+
VERSION = "1.2.2"
|
7
8
|
|
8
|
-
SHH = ENV["MTB_VERBOSE"].to_i >= 2 ? nil : "
|
9
|
+
SHH = ENV["MTB_VERBOSE"].to_i >= 2 ? nil : " > /dev/null 2>&1"
|
10
|
+
|
11
|
+
# Borrowed from rake
|
12
|
+
RUBY = ENV['RUBY'] ||
|
13
|
+
File.join(RbConfig::CONFIG['bindir'],
|
14
|
+
RbConfig::CONFIG['ruby_install_name'] +
|
15
|
+
RbConfig::CONFIG['EXEEXT']).sub(/.*\s.*/m, '"\&"')
|
9
16
|
|
10
17
|
attr_accessor :tainted, :failures, :culprits, :mode, :seen_bad
|
11
18
|
alias :tainted? :tainted
|
@@ -16,7 +23,7 @@ class Minitest::Bisect
|
|
16
23
|
|
17
24
|
def initialize
|
18
25
|
self.culprits = []
|
19
|
-
self.failures = Hash.new { |h,k| h[k] = Hash.new { |h2,k2| h2[k2] = [] } }
|
26
|
+
self.failures = Hash.new { |h, k| h[k] = Hash.new { |h2, k2| h2[k2] = [] } }
|
20
27
|
end
|
21
28
|
|
22
29
|
def reset
|
@@ -109,9 +116,9 @@ class Minitest::Bisect
|
|
109
116
|
def build_files_cmd culprits, rb, mt
|
110
117
|
reset
|
111
118
|
|
112
|
-
tests = culprits.flatten.compact.map {|f| %(require "./#{f}")}.join " ; "
|
119
|
+
tests = culprits.flatten.compact.map { |f| %(require "./#{f}") }.join " ; "
|
113
120
|
|
114
|
-
%(
|
121
|
+
%(#{RUBY} #{rb.shelljoin} -e '#{tests}' -- #{mt.map(&:to_s).shelljoin})
|
115
122
|
end
|
116
123
|
|
117
124
|
def build_methods_cmd cmd, culprits = [], bad = nil
|
@@ -163,9 +170,9 @@ class Minitest::Bisect
|
|
163
170
|
end
|
164
171
|
end
|
165
172
|
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
173
|
+
return if fails.empty?
|
174
|
+
|
175
|
+
self.tainted = true
|
176
|
+
self.failures[file][klass] << method
|
170
177
|
end
|
171
178
|
end
|
@@ -40,7 +40,7 @@ class ComboFinder
|
|
40
40
|
|
41
41
|
d
|
42
42
|
d "# new round!"
|
43
|
-
d "# of subsections in this round: #{subsections.size}"
|
43
|
+
d "# of subsections in this round: #{subsections.to_a.size}"
|
44
44
|
d
|
45
45
|
|
46
46
|
found = subsections.find { |a|
|
@@ -79,7 +79,7 @@ class ComboFinder
|
|
79
79
|
ary
|
80
80
|
end
|
81
81
|
|
82
|
-
def d s=""
|
82
|
+
def d s = ""
|
83
83
|
warn s if ENV["MTB_DEBUG"]
|
84
84
|
end
|
85
85
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-bisect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
29
29
|
xJcC6UN6NHMOVMyAXsr2HR0gRRx4ofN1LoP2KhXzSr8UMvQYlwPmE0N5GQv1b5AO
|
30
30
|
VpzF30vNaJK6ZT7xlIsIlwmH
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date:
|
32
|
+
date: 2015-04-27 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: minitest-server
|
@@ -51,14 +51,14 @@ dependencies:
|
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '5.
|
54
|
+
version: '5.6'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
57
|
version_requirements: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '5.
|
61
|
+
version: '5.6'
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: rdoc
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,6 +73,20 @@ dependencies:
|
|
73
73
|
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '4.0'
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: rake
|
78
|
+
requirement: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>'
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
type: :development
|
84
|
+
prerelease: false
|
85
|
+
version_requirements: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>'
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
76
90
|
- !ruby/object:Gem::Dependency
|
77
91
|
name: hoe
|
78
92
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,11 +174,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
174
|
version: '0'
|
161
175
|
requirements: []
|
162
176
|
rubyforge_project:
|
163
|
-
rubygems_version: 2.4.
|
177
|
+
rubygems_version: 2.4.5
|
164
178
|
signing_key:
|
165
179
|
specification_version: 4
|
166
180
|
summary: Hunting down random test failures can be very very difficult, sometimes impossible,
|
167
181
|
but minitest-bisect makes it easy
|
168
|
-
test_files:
|
169
|
-
- test/minitest/test_bisect.rb
|
170
|
-
- test/minitest/test_find_minimal_combination.rb
|
182
|
+
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|