minitest-bisect 1.1.0 → 1.2.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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.rdoc +7 -0
- data/Manifest.txt +0 -2
- data/README.rdoc +4 -4
- data/Rakefile +4 -0
- data/lib/minitest/bisect.rb +9 -2
- metadata +25 -13
- metadata.gz.sig +2 -2
- data/lib/minitest/server.rb +0 -45
- data/lib/minitest/server_plugin.rb +0 -44
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c07d701766f01fd6301659fb71cac1ac8682218c
|
4
|
+
data.tar.gz: 3e0a61e0790298e58af74f7d2f534c6d4d1bf9a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1dc4a0b243fd45c32f897f78165ea31f9896917624e4448d854dbb45c74caa1143a89bde40adfce3b8d4d5c3189332a82e78a9f96141970b783b74572284cd4
|
7
|
+
data.tar.gz: 0ed7e8b24b0076ea3d6d1e696dfa1d51d3421d576c78262aeaac720bf5c286b72c61a92d6f568d14d9c8a9087c98484783e6c936532309f1d8aafa5602fd3404
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/History.rdoc
CHANGED
data/Manifest.txt
CHANGED
data/README.rdoc
CHANGED
@@ -70,7 +70,7 @@ So, you run the tests again, but this time with minitest_bisect.
|
|
70
70
|
Provide the seed given in the failure so the tests always run in the
|
71
71
|
same order and reproduce every time.
|
72
72
|
|
73
|
-
minitest_bisect
|
73
|
+
minitest_bisect will first minimize the number of files, then it will
|
74
74
|
turn around and minimize the number of methods.
|
75
75
|
|
76
76
|
$ minitest_bisect --seed 3911 example/test*.rb
|
@@ -128,9 +128,9 @@ determine what side-effects (or lack thereof) are causing your test
|
|
128
128
|
failure when run in this specific order.
|
129
129
|
|
130
130
|
This happens in a single run. Depending on how many files / tests you
|
131
|
-
have and how long they take, the
|
132
|
-
|
133
|
-
|
131
|
+
have and how long they take, the minimization might take a long time,
|
132
|
+
but each iteration can reduce the number of tests so it should get
|
133
|
+
quicker with time.
|
134
134
|
|
135
135
|
== REQUIREMENTS:
|
136
136
|
|
data/Rakefile
CHANGED
@@ -7,9 +7,13 @@ Hoe.plugin :isolate
|
|
7
7
|
Hoe.plugin :seattlerb
|
8
8
|
Hoe.plugin :rdoc
|
9
9
|
|
10
|
+
Hoe.add_include_dirs "../../minitest-server/dev/lib"
|
11
|
+
|
10
12
|
Hoe.spec "minitest-bisect" do
|
11
13
|
developer "Ryan Davis", "ryand-ruby@zenspider.com"
|
12
14
|
license "MIT"
|
15
|
+
|
16
|
+
dependency "minitest-server", "~> 1.0"
|
13
17
|
end
|
14
18
|
|
15
19
|
require "rake/testtask"
|
data/lib/minitest/bisect.rb
CHANGED
@@ -3,7 +3,7 @@ require "minitest/server"
|
|
3
3
|
require "shellwords"
|
4
4
|
|
5
5
|
class Minitest::Bisect
|
6
|
-
VERSION = "1.
|
6
|
+
VERSION = "1.2.0"
|
7
7
|
|
8
8
|
SHH = ENV["MTB_VERBOSE"].to_i >= 2 ? nil : " &> /dev/null"
|
9
9
|
|
@@ -145,7 +145,14 @@ class Minitest::Bisect
|
|
145
145
|
cmd
|
146
146
|
end
|
147
147
|
|
148
|
-
|
148
|
+
############################################################
|
149
|
+
# Server Methods:
|
150
|
+
|
151
|
+
def minitest_start
|
152
|
+
self.failures.clear
|
153
|
+
end
|
154
|
+
|
155
|
+
def minitest_result file, klass, method, fails, assertions, time
|
149
156
|
fails.reject! { |fail| Minitest::Skip === fail }
|
150
157
|
|
151
158
|
if mode == :methods then
|
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.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -10,9 +10,9 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
13
|
+
MIIDPjCCAiagAwIBAgIBAjANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
|
14
14
|
ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
|
15
|
-
|
15
|
+
GRYDY29tMB4XDTE0MDkxNzIzMDcwN1oXDTE1MDkxNzIzMDcwN1owRTETMBEGA1UE
|
16
16
|
AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
|
17
17
|
JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
|
18
18
|
b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
|
@@ -22,15 +22,29 @@ cert_chain:
|
|
22
22
|
qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
|
23
23
|
gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
24
24
|
HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBBQUAA4IB
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
25
|
+
AQAFoDJRokCQdxFfOrmsKX41KOFlU/zjrbDVM9hgB/Ur999M6OXGSi8FitXNtMwY
|
26
|
+
FVjsiAPeU7HaWVVcZkj6IhINelTkXsxgGz/qCzjHy3iUMuZWw36cS0fiWJ5rvH+e
|
27
|
+
hD7uXxJSFuyf1riDGI1aeWbQ74WMwvNstOxLUMiV5a1fzBhlxPqb537ubDjq/M/h
|
28
|
+
zPUFPVYeL5KjDHLCqI2FwIk2sEMOQgjpXHzl+3NlD2LUgUhHDMevmgVua0e2GT1B
|
29
|
+
xJcC6UN6NHMOVMyAXsr2HR0gRRx4ofN1LoP2KhXzSr8UMvQYlwPmE0N5GQv1b5AO
|
30
|
+
VpzF30vNaJK6ZT7xlIsIlwmH
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2014-09-
|
32
|
+
date: 2014-09-18 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: minitest-server
|
36
|
+
requirement: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.0'
|
41
|
+
type: :runtime
|
42
|
+
prerelease: false
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.0'
|
34
48
|
- !ruby/object:Gem::Dependency
|
35
49
|
name: minitest
|
36
50
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,8 +136,6 @@ files:
|
|
122
136
|
- example/test_bad8.rb
|
123
137
|
- lib/minitest/bisect.rb
|
124
138
|
- lib/minitest/find_minimal_combination.rb
|
125
|
-
- lib/minitest/server.rb
|
126
|
-
- lib/minitest/server_plugin.rb
|
127
139
|
- test/minitest/test_bisect.rb
|
128
140
|
- test/minitest/test_find_minimal_combination.rb
|
129
141
|
homepage: https://github.com/seattlerb/minitest-bisect
|
@@ -148,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
160
|
version: '0'
|
149
161
|
requirements: []
|
150
162
|
rubyforge_project:
|
151
|
-
rubygems_version: 2.
|
163
|
+
rubygems_version: 2.4.1
|
152
164
|
signing_key:
|
153
165
|
specification_version: 4
|
154
166
|
summary: Hunting down random test failures can be very very difficult, sometimes impossible,
|
metadata.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
�����R�4d`�6��Cc�"���q������D��XL�ґ�z���J��oe�$�����6���d�֟u�VM 3A��o.g��ˌ��A�=�7�Y݆=�}���r��U�q-��u3
|
2
|
+
��j��ᓜ zQ'M\�f����<��W�f��5��!���)��(���g)��ӯx��n̬�z�u\%Zgk���I.���vj9�?ޟ��m�N�\K]5n���5��xː5�Oq-%sd�S�
|
data/lib/minitest/server.rb
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
require "drb"
|
2
|
-
require "tmpdir"
|
3
|
-
require "minitest"
|
4
|
-
|
5
|
-
module Minitest
|
6
|
-
class Server
|
7
|
-
TOPDIR = Dir.pwd + "/"
|
8
|
-
|
9
|
-
def self.path pid = $$
|
10
|
-
"drbunix:#{Dir.tmpdir}/minitest.#{pid}"
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.run client
|
14
|
-
DRb.start_service path, new(client)
|
15
|
-
end
|
16
|
-
|
17
|
-
def self.stop
|
18
|
-
DRb.stop_service
|
19
|
-
end
|
20
|
-
|
21
|
-
attr_accessor :client
|
22
|
-
|
23
|
-
def initialize client
|
24
|
-
self.client = client
|
25
|
-
end
|
26
|
-
|
27
|
-
def quit
|
28
|
-
self.class.stop
|
29
|
-
end
|
30
|
-
|
31
|
-
def start
|
32
|
-
client.failures.clear # TODO: push down to subclass
|
33
|
-
end
|
34
|
-
|
35
|
-
def result file, klass, method, fails, assertions, time
|
36
|
-
file = file.sub(/^#{TOPDIR}/, "")
|
37
|
-
|
38
|
-
client.result file, klass, method, fails, assertions, time
|
39
|
-
end
|
40
|
-
|
41
|
-
def report
|
42
|
-
# do nothing
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
@@ -1,44 +0,0 @@
|
|
1
|
-
require "minitest"
|
2
|
-
|
3
|
-
module Minitest
|
4
|
-
@server = false
|
5
|
-
|
6
|
-
def self.plugin_server_options opts, options # :nodoc:
|
7
|
-
opts.on "--server=pid", Integer, "Connect to minitest server w/ pid." do |s|
|
8
|
-
@server = s
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.plugin_server_init options
|
13
|
-
if @server then
|
14
|
-
require "minitest/server"
|
15
|
-
self.reporter << Minitest::ServerReporter.new(@server)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
module Minitest
|
21
|
-
class ServerReporter < Minitest::AbstractReporter
|
22
|
-
def initialize pid
|
23
|
-
DRb.start_service
|
24
|
-
uri = Minitest::Server.path(pid)
|
25
|
-
@mt_server = DRbObject.new_with_uri uri
|
26
|
-
super()
|
27
|
-
end
|
28
|
-
|
29
|
-
def start
|
30
|
-
@mt_server.start
|
31
|
-
end
|
32
|
-
|
33
|
-
def record result
|
34
|
-
r = result
|
35
|
-
c = r.class
|
36
|
-
file, = c.instance_method(r.name).source_location
|
37
|
-
@mt_server.result file, c.name, r.name, r.failures, r.assertions, r.time
|
38
|
-
end
|
39
|
-
|
40
|
-
def report
|
41
|
-
@mt_server.report
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|