mutant 0.10.7 → 0.10.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mutant/config.rb +7 -5
- data/lib/mutant/result.rb +13 -3
- data/lib/mutant/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8448aecff5544038b0427224ef0e14c8957fcb1fb90a6ab223855a364a7de67
|
4
|
+
data.tar.gz: b27549faf5c9e9f610500fb48b8af63b68eedfc58ba84e600bbb120069c31b57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f845db6418eaecf71e45e076cec52bdeaf57bd40ea4c55e5f0b3d5ec51e95cd26cf1e7f299ce756fbd9450b86a18453f69ac16e40d10f1ec374173d0e95f0af
|
7
|
+
data.tar.gz: f30e34bd368f29e124dedf212ebab64ecf75d807fd9c9a8b4a466e03b2e1bf8eb6b995cf54f6c4103ddabdc6902d62ff61af0a44058a6f6ab66ee7eb8fb08fd1
|
data/lib/mutant/config.rb
CHANGED
@@ -38,11 +38,12 @@ module Mutant
|
|
38
38
|
private_constant(*constants(false))
|
39
39
|
|
40
40
|
class CoverageCriteria
|
41
|
-
include Anima.new(:
|
41
|
+
include Anima.new(:process_abort, :test_result, :timeout)
|
42
42
|
|
43
43
|
DEFAULT = new(
|
44
|
-
|
45
|
-
test_result:
|
44
|
+
process_abort: false,
|
45
|
+
test_result: true,
|
46
|
+
timeout: false
|
46
47
|
)
|
47
48
|
|
48
49
|
TRANSFORM =
|
@@ -50,8 +51,9 @@ module Mutant
|
|
50
51
|
[
|
51
52
|
Transform::Hash.new(
|
52
53
|
optional: [
|
53
|
-
Transform::Hash::Key.new('
|
54
|
-
Transform::Hash::Key.new('test_result',
|
54
|
+
Transform::Hash::Key.new('process_abort', Transform::BOOLEAN),
|
55
|
+
Transform::Hash::Key.new('test_result', Transform::BOOLEAN),
|
56
|
+
Transform::Hash::Key.new('timeout', Transform::BOOLEAN)
|
55
57
|
],
|
56
58
|
required: []
|
57
59
|
),
|
data/lib/mutant/result.rb
CHANGED
@@ -233,7 +233,7 @@ module Mutant
|
|
233
233
|
#
|
234
234
|
# @return [Boolean]
|
235
235
|
def success?
|
236
|
-
test_result || timeout
|
236
|
+
process_abort || test_result || timeout
|
237
237
|
end
|
238
238
|
end
|
239
239
|
|
@@ -250,8 +250,9 @@ module Mutant
|
|
250
250
|
# @praam [Result::CoverageCriteria]
|
251
251
|
def criteria_result(coverage_criteria)
|
252
252
|
CoverageCriteria.new(
|
253
|
-
|
254
|
-
|
253
|
+
process_abort: coverage_criteria.process_abort && process_abort?,
|
254
|
+
test_result: coverage_criteria.test_result && test_result_success?,
|
255
|
+
timeout: coverage_criteria.timeout && timeout?
|
255
256
|
)
|
256
257
|
end
|
257
258
|
|
@@ -269,6 +270,15 @@ module Mutant
|
|
269
270
|
!isolation_result.timeout.nil?
|
270
271
|
end
|
271
272
|
|
273
|
+
# Test for unexpected process abort
|
274
|
+
#
|
275
|
+
# @return [Boolean]
|
276
|
+
def process_abort?
|
277
|
+
process_status = isolation_result.process_status or return false
|
278
|
+
|
279
|
+
!timeout? && !process_status.exited?
|
280
|
+
end
|
281
|
+
|
272
282
|
private
|
273
283
|
|
274
284
|
# Test if mutation was handled successfully
|
data/lib/mutant/version.rb
CHANGED