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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: defe26105634d28a81b10e876713ab4e29a53a5d78ac8fe7e2d8a44d32b644c6
4
- data.tar.gz: fad9645931798ed165a249e8e8d4a1c032896ceba6b823a1464ff2f60a7cadbb
3
+ metadata.gz: b8448aecff5544038b0427224ef0e14c8957fcb1fb90a6ab223855a364a7de67
4
+ data.tar.gz: b27549faf5c9e9f610500fb48b8af63b68eedfc58ba84e600bbb120069c31b57
5
5
  SHA512:
6
- metadata.gz: 79da9f75f18510bbf81e43e2b98e43c4b92ddf2e6cb68b66828f9f4240f7d3e8747d6e475130f83a2d1edec8c1dda43a34f48524bd7439372e545a046099c28d
7
- data.tar.gz: 7d8aac2776eca84aff051b7a146863bb271c5df4ec7dc344f041d3a22a17b4d87f9f48d5201e2dceec30f548adc7135d443ee78bc00764a9399fb677f2cf0aa5
6
+ metadata.gz: 2f845db6418eaecf71e45e076cec52bdeaf57bd40ea4c55e5f0b3d5ec51e95cd26cf1e7f299ce756fbd9450b86a18453f69ac16e40d10f1ec374173d0e95f0af
7
+ data.tar.gz: f30e34bd368f29e124dedf212ebab64ecf75d807fd9c9a8b4a466e03b2e1bf8eb6b995cf54f6c4103ddabdc6902d62ff61af0a44058a6f6ab66ee7eb8fb08fd1
@@ -38,11 +38,12 @@ module Mutant
38
38
  private_constant(*constants(false))
39
39
 
40
40
  class CoverageCriteria
41
- include Anima.new(:timeout, :test_result)
41
+ include Anima.new(:process_abort, :test_result, :timeout)
42
42
 
43
43
  DEFAULT = new(
44
- timeout: false,
45
- test_result: true
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('timeout', Transform::BOOLEAN),
54
- Transform::Hash::Key.new('test_result', Transform::BOOLEAN)
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
  ),
@@ -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
- test_result: coverage_criteria.test_result && test_result_success?,
254
- timeout: coverage_criteria.timeout && timeout?
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Mutant
4
4
  # Current mutant version
5
- VERSION = '0.10.7'
5
+ VERSION = '0.10.8'
6
6
  end # Mutant
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.7
4
+ version: 0.10.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Schirp