mutant 0.6.5 → 0.6.6
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/.travis.yml +1 -2
- data/Changelog.md +6 -2
- data/README.md +27 -1
- data/Rakefile +4 -3
- data/circle.yml +1 -1
- data/lib/mutant/ast/types.rb +4 -1
- data/lib/mutant/mutator/node/binary.rb +2 -0
- data/lib/mutant/mutator/node/generic.rb +1 -1
- data/lib/mutant/mutator/registry.rb +2 -0
- data/lib/mutant/version.rb +1 -1
- data/meta/and.rb +4 -0
- data/meta/begin.rb +1 -1
- data/meta/dsym.rb +7 -6
- data/meta/or.rb +4 -0
- data/mutant.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3fbd46aa447dc402152bb4199a0ecfb1f1e9c8e
|
4
|
+
data.tar.gz: f01ecbd6a0dc0fac2c5676ab51d957b7a64744b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04d88ed0b9914df3e8709711bd47a88390196a6316b385b07ea4a311b79b547936a5c3660b1ff85740fc8162dbe9c12ed463861695e9733ffcd87fe84eaebe56
|
7
|
+
data.tar.gz: 9702946488ff1c82f7a8ba2de538903acdc200ac161d33f016c37548d93594134243dd590c15f0647e5fed36b54b1cef7c3980a4af688b53e90801c9250ad5af
|
data/.travis.yml
CHANGED
data/Changelog.md
CHANGED
@@ -1,8 +1,12 @@
|
|
1
|
-
# v0.6.
|
1
|
+
# v0.6.6 2014-11-11
|
2
|
+
|
3
|
+
* Fix emitter to recurse into left and right of binary nodes.
|
4
|
+
|
5
|
+
# v0.6.5 2014-10-28
|
2
6
|
|
3
7
|
* Fix killforks not to leak zombies.
|
4
8
|
|
5
|
-
# v0.6.4 2014-10-
|
9
|
+
# v0.6.4 2014-10-27
|
6
10
|
|
7
11
|
* Do not buffer report prints, speedup large report generation.
|
8
12
|
* Fix some cases where --fail-fast semantics stopped far to late.
|
data/README.md
CHANGED
@@ -6,6 +6,7 @@ mutant
|
|
6
6
|
[](https://codeclimate.com/github/mbj/mutant)
|
7
7
|
[](http://inch-ci.org/github/mbj/mutant)
|
8
8
|
[](https://rubygems.org/gems/mutant)
|
9
|
+
[](https://flattr.com/thing/1823010/mbjmutant-on-GitHub)
|
9
10
|
|
10
11
|
Mutant is a mutation testing tool for Ruby.
|
11
12
|
|
@@ -73,7 +74,7 @@ Install the gem `mutant` via your preferred method.
|
|
73
74
|
gem install mutant
|
74
75
|
```
|
75
76
|
|
76
|
-
If you plan to use the RSpec integration you'll have to install `mutant-rspec` also.
|
77
|
+
If you plan to use the RSpec integration you'll have to install `mutant-rspec` also.
|
77
78
|
Please add an explicit dependency to `rspec-core` for the RSpec version you want to use.
|
78
79
|
|
79
80
|
```ruby
|
@@ -82,6 +83,31 @@ gem install mutant-rspec
|
|
82
83
|
|
83
84
|
The minitest integration is still in the works.
|
84
85
|
|
86
|
+
The Crash / Stuck Problem (MRI)
|
87
|
+
-------------------------------
|
88
|
+
|
89
|
+
Mutations generated by mutant can cause MRI to enter VM states its not prepared for.
|
90
|
+
All MRI versions above 1.9 are affected by this depending on your compiler flags, compiler version,
|
91
|
+
and OS scheduling behavior.
|
92
|
+
|
93
|
+
This can have the following unintended effects:
|
94
|
+
|
95
|
+
* MRI crashes with a segfault. Mutant kills each mutation in a dedicated fork to isolate
|
96
|
+
the mutations side effects when this fork terminates abnormally (segfault) mutant
|
97
|
+
counts the mutation as killed.
|
98
|
+
|
99
|
+
* MRI crashes with a segfault and gets stuck when handling the segfault.
|
100
|
+
Depending on the number of active kill jobs mutant might appear to continue normally untill
|
101
|
+
all workers are stuck into this state when it begins to hang.
|
102
|
+
Currently mutant must assume that your test suite simply not terminated yet as from the outside
|
103
|
+
(parent process) the difference between a long running test and a stuck MRI is not observable.
|
104
|
+
Its planned to implement a timeout enforced from the parent process, but ideally MRI simply gets fixed.
|
105
|
+
|
106
|
+
References:
|
107
|
+
|
108
|
+
* Mutant bug: https://github.com/mbj/mutant/issues/265
|
109
|
+
* Upstream bug: https://bugs.ruby-lang.org/issues/10460
|
110
|
+
|
85
111
|
Examples
|
86
112
|
--------
|
87
113
|
|
data/Rakefile
CHANGED
@@ -4,14 +4,15 @@ require 'devtools'
|
|
4
4
|
|
5
5
|
Devtools.init_rake_tasks
|
6
6
|
|
7
|
-
#
|
8
|
-
|
7
|
+
# Frequent lookups in MRI make mutation analysis getting stuck on CI
|
8
|
+
# See: https://github.com/mbj/mutant/issues/265
|
9
|
+
if ENV['CI']
|
9
10
|
Rake.application.load_imports
|
10
11
|
|
11
12
|
task('metrics:mutant').clear
|
12
13
|
namespace :metrics do
|
13
14
|
task :mutant => :coverage do
|
14
|
-
$stderr.puts 'Mutant self test via zombie not active on
|
15
|
+
$stderr.puts 'Mutant self test via zombie not active on CI'
|
15
16
|
end
|
16
17
|
end
|
17
18
|
end
|
data/circle.yml
CHANGED
data/lib/mutant/ast/types.rb
CHANGED
@@ -41,8 +41,11 @@ module Mutant
|
|
41
41
|
# Nodes that are NOT generated by parser but used by mutant / unparser.
|
42
42
|
EXTRA = symbolset.(%w[empty])
|
43
43
|
|
44
|
+
# Nodes that are currently missing from parser META
|
45
|
+
MISSING = symbolset.(%w[rational])
|
46
|
+
|
44
47
|
# All node types mutant handles
|
45
|
-
ALL = symbolset.((Parser::Meta::NODE_TYPES + EXTRA) - BLACKLIST)
|
48
|
+
ALL = symbolset.((Parser::Meta::NODE_TYPES + EXTRA + MISSING) - BLACKLIST)
|
46
49
|
end # Types
|
47
50
|
end # AST
|
48
51
|
end # Mutant
|
@@ -13,7 +13,7 @@ module Mutant
|
|
13
13
|
:alias, :for, :xstr, :back_ref, :class,
|
14
14
|
:sclass, :match_with_lvasgn, :while_post,
|
15
15
|
:until_post, :preexe, :postexe, :iflipflop, :eflipflop, :kwsplat,
|
16
|
-
:shadowarg
|
16
|
+
:shadowarg, :rational, :complex, :__FILE__, :__LINE__
|
17
17
|
)
|
18
18
|
|
19
19
|
private
|
data/lib/mutant/version.rb
CHANGED
data/meta/and.rb
CHANGED
@@ -7,6 +7,10 @@ Mutant::Meta::Example.add do
|
|
7
7
|
mutation 'true'
|
8
8
|
mutation 'false'
|
9
9
|
mutation 'true or false'
|
10
|
+
mutation 'true and nil'
|
11
|
+
mutation 'nil and false'
|
12
|
+
mutation 'false and false'
|
13
|
+
mutation 'true and true'
|
10
14
|
mutation '!true and false'
|
11
15
|
mutation '!(true and false)'
|
12
16
|
end
|
data/meta/begin.rb
CHANGED
data/meta/dsym.rb
CHANGED
@@ -4,10 +4,11 @@ Mutant::Meta::Example.add do
|
|
4
4
|
source ':"foo#{bar}baz"'
|
5
5
|
|
6
6
|
singleton_mutations
|
7
|
-
|
8
|
-
mutation
|
9
|
-
mutation
|
10
|
-
mutation ':
|
11
|
-
mutation ':
|
12
|
-
mutation '
|
7
|
+
# TODO: Unparser imperfection two asts with same source.
|
8
|
+
mutation s(:dsym, s(:nil), s(:begin, s(:send, nil, :bar)), s(:str, 'baz'))
|
9
|
+
mutation s(:dsym, s(:self), s(:begin, s(:send, nil, :bar)), s(:str, 'baz'))
|
10
|
+
mutation s(:dsym, s(:str, 'foo'), s(:begin, s(:self)), s(:str, 'baz'))
|
11
|
+
mutation s(:dsym, s(:str, 'foo'), s(:begin, s(:nil)), s(:str, 'baz'))
|
12
|
+
mutation s(:dsym, s(:str, 'foo'), s(:begin, s(:send, nil, :bar)), s(:nil))
|
13
|
+
mutation s(:dsym, s(:str, 'foo'), s(:begin, s(:send, nil, :bar)), s(:self))
|
13
14
|
end
|
data/meta/or.rb
CHANGED
@@ -6,6 +6,10 @@ Mutant::Meta::Example.add do
|
|
6
6
|
singleton_mutations
|
7
7
|
mutation 'true'
|
8
8
|
mutation 'false'
|
9
|
+
mutation 'nil or false'
|
10
|
+
mutation 'false or false'
|
11
|
+
mutation 'true or nil'
|
12
|
+
mutation 'true or true'
|
9
13
|
mutation 'true and false'
|
10
14
|
mutation '!true or false'
|
11
15
|
mutation '!(true or false)'
|
data/mutant.gemspec
CHANGED
@@ -23,14 +23,14 @@ Gem::Specification.new do |gem|
|
|
23
23
|
|
24
24
|
gem.required_ruby_version = '>= 1.9.3'
|
25
25
|
|
26
|
-
gem.add_runtime_dependency('parser', '~> 2.
|
26
|
+
gem.add_runtime_dependency('parser', '~> 2.2.pre.7')
|
27
27
|
gem.add_runtime_dependency('ast', '~> 2.0')
|
28
28
|
gem.add_runtime_dependency('diff-lcs', '~> 1.2')
|
29
29
|
gem.add_runtime_dependency('parallel', '~> 1.3')
|
30
30
|
gem.add_runtime_dependency('morpher', '~> 0.2.3')
|
31
31
|
gem.add_runtime_dependency('procto', '~> 0.0.2')
|
32
32
|
gem.add_runtime_dependency('abstract_type', '~> 0.0.7')
|
33
|
-
gem.add_runtime_dependency('unparser', '~> 0.1.
|
33
|
+
gem.add_runtime_dependency('unparser', '~> 0.1.16')
|
34
34
|
gem.add_runtime_dependency('ice_nine', '~> 0.11.0')
|
35
35
|
gem.add_runtime_dependency('adamantium', '~> 0.2.0')
|
36
36
|
gem.add_runtime_dependency('memoizable', '~> 0.4.2')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mutant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Schirp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.2.pre.7
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.2.pre.7
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: ast
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.1.
|
117
|
+
version: 0.1.16
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.1.
|
124
|
+
version: 0.1.16
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: ice_nine
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|