henitai 0.2.0 → 0.2.1
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/CHANGELOG.md +26 -1
- data/README.md +15 -3
- data/assets/schema/henitai.schema.json +6 -0
- data/lib/henitai/cli/clean_command.rb +48 -0
- data/lib/henitai/cli/command_support.rb +51 -0
- data/lib/henitai/cli/init_command.rb +64 -0
- data/lib/henitai/cli/operator_command.rb +95 -0
- data/lib/henitai/cli/options.rb +120 -0
- data/lib/henitai/cli/run_command.rb +103 -0
- data/lib/henitai/cli.rb +16 -404
- data/lib/henitai/configuration.rb +2 -1
- data/lib/henitai/configuration_validator/rules.rb +143 -0
- data/lib/henitai/configuration_validator/scalars.rb +123 -0
- data/lib/henitai/configuration_validator.rb +12 -239
- data/lib/henitai/eager_load.rb +36 -5
- data/lib/henitai/execution_engine.rb +4 -3
- data/lib/henitai/integration/base.rb +171 -0
- data/lib/henitai/integration/child_debug_support.rb +115 -0
- data/lib/henitai/integration/child_runtime_control.rb +50 -0
- data/lib/henitai/integration/coverage_suppression.rb +43 -0
- data/lib/henitai/integration/minitest.rb +133 -0
- data/lib/henitai/integration/mutant_run_support.rb +77 -0
- data/lib/henitai/integration/rspec_child_runner.rb +61 -0
- data/lib/henitai/integration/rspec_test_selection.rb +135 -0
- data/lib/henitai/integration/scenario_log_support.rb +116 -0
- data/lib/henitai/integration.rb +22 -846
- data/lib/henitai/mutant/activator.rb +1 -79
- data/lib/henitai/mutant/parameter_source.rb +98 -0
- data/lib/henitai/mutant.rb +1 -0
- data/lib/henitai/mutant_history_store/sql.rb +72 -0
- data/lib/henitai/mutant_history_store.rb +5 -69
- data/lib/henitai/per_test_coverage_collector.rb +3 -1
- data/lib/henitai/process_worker_runner.rb +48 -334
- data/lib/henitai/reporter.rb +20 -8
- data/lib/henitai/result.rb +17 -15
- data/lib/henitai/runner.rb +59 -182
- data/lib/henitai/slot_scheduler/draining.rb +140 -0
- data/lib/henitai/slot_scheduler/process_control.rb +43 -0
- data/lib/henitai/slot_scheduler.rb +214 -0
- data/lib/henitai/survivor_rerun_strategy.rb +195 -0
- data/lib/henitai/unparse_helper.rb +5 -2
- data/lib/henitai/version.rb +1 -1
- data/lib/henitai.rb +2 -0
- data/sig/configuration_validator.rbs +46 -22
- data/sig/henitai.rbs +158 -73
- metadata +25 -2
data/sig/henitai.rbs
CHANGED
|
@@ -76,14 +76,6 @@ module Henitai
|
|
|
76
76
|
module Integration::ChildDebugSupport
|
|
77
77
|
private
|
|
78
78
|
|
|
79
|
-
def run_rspec_runner: (Array[String]) -> untyped
|
|
80
|
-
def build_rspec_runner: () -> untyped
|
|
81
|
-
def configure_rspec_runner: (untyped) -> void
|
|
82
|
-
def load_rspec_spec_files: (Array[String]) -> void
|
|
83
|
-
def run_rspec_specs: (untyped) -> untyped
|
|
84
|
-
def debug_child_timeout_dump: (Integer) -> void
|
|
85
|
-
def install_debug_timeout_trap: () -> void
|
|
86
|
-
def debug_child_thread_dump: (String) -> void
|
|
87
79
|
def debug_child_puts: (String) -> void
|
|
88
80
|
def debug_child?: () -> bool
|
|
89
81
|
def debug_child_rspec_trace: (
|
|
@@ -97,14 +89,55 @@ module Henitai
|
|
|
97
89
|
def debug_child_activation_end: (untyped, test_files: Array[String]) -> void
|
|
98
90
|
def debug_child_mutant_meta: (Mutant) -> void
|
|
99
91
|
def debug_child_activation_check: () -> void
|
|
100
|
-
def suppress_simplecov!: () -> void
|
|
101
|
-
def suppress_coverage!: () -> void
|
|
102
92
|
def loaded_feature_map: (Array[String]) -> Array[[String, bool]]
|
|
103
93
|
def loaded_feature?: (String) -> bool
|
|
104
94
|
def rspec_world_example_count: () -> Integer?
|
|
105
95
|
def pause: (Float) -> void
|
|
106
96
|
end
|
|
107
97
|
|
|
98
|
+
module Integration::ChildRuntimeControl
|
|
99
|
+
private
|
|
100
|
+
|
|
101
|
+
def suppress_simplecov!: () -> void
|
|
102
|
+
def suppress_coverage!: () -> void
|
|
103
|
+
def debug_child_timeout_dump: (Integer) -> void
|
|
104
|
+
def install_debug_timeout_trap: () -> void
|
|
105
|
+
def debug_child_thread_dump: (String) -> void
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
module Integration::RspecChildRunner
|
|
109
|
+
private
|
|
110
|
+
|
|
111
|
+
def run_rspec_runner: (Array[String]) -> untyped
|
|
112
|
+
def build_rspec_runner: () -> untyped
|
|
113
|
+
def configure_rspec_runner: (untyped) -> void
|
|
114
|
+
def load_rspec_spec_files: (Array[String]) -> void
|
|
115
|
+
def run_rspec_specs: (untyped) -> untyped
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
module Integration::RspecTestSelection
|
|
119
|
+
REQUIRE_DIRECTIVE_PATTERN: Regexp
|
|
120
|
+
|
|
121
|
+
def select_tests: (Subject) -> Array[String]
|
|
122
|
+
|
|
123
|
+
private
|
|
124
|
+
|
|
125
|
+
def spec_files: () -> Array[String]
|
|
126
|
+
def fallback_spec_files: (Subject) -> Array[String]
|
|
127
|
+
def excluded_spec_files: () -> Array[String]
|
|
128
|
+
def rspec_exclude_patterns: () -> Array[String]
|
|
129
|
+
def rspec_config_lines: () -> Array[String]
|
|
130
|
+
def rspec_config_path: () -> String
|
|
131
|
+
def selection_patterns: (Subject) -> Array[String]
|
|
132
|
+
def requires_source_file?: (String, String) -> bool
|
|
133
|
+
def requires_source_file_transitively?: (String, String, ?Array[String]) -> bool
|
|
134
|
+
def required_files: (String) -> Array[String]
|
|
135
|
+
def resolve_required_file: (String, String, String) -> String?
|
|
136
|
+
def relative_candidates: (String, String) -> Array[String]
|
|
137
|
+
def require_candidates: (String, String) -> Array[String]
|
|
138
|
+
def expand_candidates: (String, String) -> Array[String]
|
|
139
|
+
end
|
|
140
|
+
|
|
108
141
|
class Configuration
|
|
109
142
|
DEFAULT_TIMEOUT: Float
|
|
110
143
|
DEFAULT_OPERATORS: Symbol
|
|
@@ -118,6 +151,7 @@ module Henitai
|
|
|
118
151
|
|
|
119
152
|
attr_reader integration: untyped
|
|
120
153
|
attr_reader includes: Array[String]
|
|
154
|
+
attr_reader excludes: Array[String]
|
|
121
155
|
attr_reader operators: Symbol
|
|
122
156
|
attr_reader timeout: Float
|
|
123
157
|
attr_reader ignore_patterns: Array[untyped]
|
|
@@ -295,6 +329,7 @@ module Henitai
|
|
|
295
329
|
|
|
296
330
|
class Base
|
|
297
331
|
include ChildDebugSupport
|
|
332
|
+
include ChildRuntimeControl
|
|
298
333
|
|
|
299
334
|
def select_tests: (Subject) -> Array[String]
|
|
300
335
|
def test_files: () -> Array[String]
|
|
@@ -314,7 +349,6 @@ module Henitai
|
|
|
314
349
|
def cleanup_child_process: (Integer) -> void
|
|
315
350
|
def suppress_simplecov!: () -> void
|
|
316
351
|
def suppress_coverage!: () -> void
|
|
317
|
-
def run_tests: (Array[String]) -> Integer
|
|
318
352
|
def debug_child?: () -> bool
|
|
319
353
|
def debug_child_puts: (String) -> void
|
|
320
354
|
def debug_child_rspec_trace: (test_files: Array[String], rspec_options: Array[String], rspec_argv: Array[String]) -> void
|
|
@@ -327,13 +361,24 @@ module Henitai
|
|
|
327
361
|
def loaded_feature_map: (Array[String]) -> Array[[String, bool]]
|
|
328
362
|
def loaded_feature?: (String) -> bool
|
|
329
363
|
def rspec_world_example_count: () -> Integer?
|
|
330
|
-
def run_child_activation_and_tests: (mutant: Mutant, test_files: Array[String], log_paths: Hash[Symbol, String]) -> Integer
|
|
331
364
|
def with_non_interactive_stdin: () { () -> untyped } -> untyped
|
|
332
365
|
def subprocess_env: () -> Hash[String, String]
|
|
333
366
|
def scenario_log_support: () -> ScenarioLogSupport
|
|
334
367
|
def with_subprocess_env: () { () -> untyped } -> untyped
|
|
335
368
|
def restore_subprocess_env: (Hash[String, String?]) -> void
|
|
336
|
-
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
module MutantRunSupport
|
|
372
|
+
def spawn_mutant: (mutant: Mutant, test_files: Array[String]) -> ChildHandle
|
|
373
|
+
def run_mutant: (mutant: Mutant, test_files: Array[String], timeout: Float) -> ScenarioExecutionResult
|
|
374
|
+
def scenario_log_paths: (String) -> Hash[Symbol, String]
|
|
375
|
+
def build_result: (untyped, Hash[Symbol, String]) -> ScenarioExecutionResult
|
|
376
|
+
def run_in_child: (mutant: Mutant, test_files: Array[String], log_paths: Hash[Symbol, String]) -> Integer
|
|
377
|
+
def mutant_log_name: (Mutant) -> String
|
|
378
|
+
|
|
379
|
+
private
|
|
380
|
+
|
|
381
|
+
def run_child_activation_and_tests: (mutant: Mutant, test_files: Array[String], log_paths: Hash[Symbol, String]) -> Integer
|
|
337
382
|
end
|
|
338
383
|
|
|
339
384
|
class ScenarioLogSupport
|
|
@@ -374,58 +419,28 @@ module Henitai
|
|
|
374
419
|
end
|
|
375
420
|
|
|
376
421
|
class RspecProcessRunner
|
|
377
|
-
def run_mutant: (
|
|
378
|
-
def run_suite: (
|
|
379
|
-
def spawn_mutant: (
|
|
422
|
+
def run_mutant: (Base, mutant: Mutant, test_files: Array[String], timeout: Float) -> ScenarioExecutionResult
|
|
423
|
+
def run_suite: (Base, Array[String], timeout: Float) -> ScenarioExecutionResult
|
|
424
|
+
def spawn_mutant: (Base, mutant: Mutant, test_files: Array[String], log_paths: Hash[Symbol, String]) -> ChildHandle
|
|
380
425
|
end
|
|
381
426
|
|
|
382
427
|
class Rspec < Base
|
|
383
|
-
|
|
428
|
+
include MutantRunSupport
|
|
429
|
+
include RspecChildRunner
|
|
430
|
+
include RspecTestSelection
|
|
431
|
+
|
|
384
432
|
DEFAULT_SUITE_TIMEOUT: Float
|
|
385
433
|
|
|
386
|
-
def select_tests: (Subject) -> Array[String]
|
|
387
434
|
def test_files: () -> Array[String]
|
|
388
|
-
def run_mutant: (mutant: Mutant, test_files: Array[String], timeout: Float) -> ScenarioExecutionResult
|
|
389
|
-
def spawn_mutant: (mutant: Mutant, test_files: Array[String]) -> ChildHandle
|
|
390
435
|
def run_suite: (Array[String], ?timeout: Float) -> ScenarioExecutionResult
|
|
391
436
|
def per_test_coverage_supported?: () -> bool
|
|
437
|
+
def suite_command: (Array[String]) -> Array[String]
|
|
438
|
+
def rspec_suite_runner_script: () -> String
|
|
439
|
+
def spawn_suite_process: (Array[String], Hash[Symbol, String]) -> Integer
|
|
392
440
|
|
|
393
441
|
private
|
|
394
442
|
|
|
395
|
-
def mutant_log_name: (Mutant) -> String
|
|
396
|
-
def run_in_child: (mutant: Mutant, test_files: Array[String], log_paths: Hash[Symbol, String]) -> Integer
|
|
397
|
-
def suppress_simplecov!: () -> void
|
|
398
|
-
def suppress_coverage!: () -> void
|
|
399
|
-
def install_debug_timeout_trap: () -> void
|
|
400
|
-
def debug_child_thread_dump: (String) -> void
|
|
401
|
-
def debug_child_example_count: (String) -> void
|
|
402
|
-
def suite_command: (Array[String]) -> Array[String]
|
|
403
|
-
def rspec_suite_runner_script: () -> String
|
|
404
|
-
def build_result: (untyped, Hash[Symbol, String]) -> ScenarioExecutionResult
|
|
405
|
-
def scenario_status: (untyped) -> Symbol
|
|
406
|
-
def exit_status_for: (untyped) -> Integer?
|
|
407
|
-
def read_log_file: (String) -> String
|
|
408
|
-
def write_combined_log: (String, String, String) -> void
|
|
409
|
-
def combined_log: (String, String) -> String
|
|
410
|
-
def scenario_log_paths: (String) -> Hash[Symbol, String]
|
|
411
443
|
def run_tests: (Array[String]) -> Integer
|
|
412
|
-
def with_subprocess_env: () { () -> untyped } -> untyped
|
|
413
|
-
def spec_files: () -> Array[String]
|
|
414
|
-
def fallback_spec_files: (Subject) -> Array[String]
|
|
415
|
-
def excluded_spec_files: () -> Array[String]
|
|
416
|
-
def rspec_exclude_patterns: () -> Array[String]
|
|
417
|
-
def rspec_config_lines: () -> Array[String]
|
|
418
|
-
def rspec_config_path: () -> String
|
|
419
|
-
def selection_patterns: (Subject) -> Array[String]
|
|
420
|
-
def requires_source_file?: (String, String) -> bool
|
|
421
|
-
def requires_source_file_transitively?: (String, String, ?Array[String]) -> bool
|
|
422
|
-
def required_files: (String) -> Array[String]
|
|
423
|
-
def resolve_required_file: (String, String, String) -> String?
|
|
424
|
-
def loaded_feature_map: (Array[String]) -> Array[[String, bool]]
|
|
425
|
-
def loaded_feature?: (String) -> bool
|
|
426
|
-
def relative_candidates: (String, String) -> Array[String]
|
|
427
|
-
def require_candidates: (String, String) -> Array[String]
|
|
428
|
-
def expand_candidates: (String, String) -> Array[String]
|
|
429
444
|
end
|
|
430
445
|
|
|
431
446
|
module CoverageRuntimeSuppressors
|
|
@@ -441,20 +456,28 @@ module Henitai
|
|
|
441
456
|
def start: (*untyped) -> nil
|
|
442
457
|
end
|
|
443
458
|
|
|
444
|
-
class Minitest <
|
|
459
|
+
class Minitest < Base
|
|
460
|
+
include MutantRunSupport
|
|
461
|
+
include RspecTestSelection
|
|
462
|
+
|
|
463
|
+
DEFAULT_SUITE_TIMEOUT: Float
|
|
464
|
+
|
|
465
|
+
def test_files: () -> Array[String]
|
|
466
|
+
def per_test_coverage_supported?: () -> bool
|
|
445
467
|
def run_mutant: (mutant: Mutant, test_files: Array[String], timeout: Float) -> ScenarioExecutionResult
|
|
446
468
|
def spawn_mutant: (mutant: Mutant, test_files: Array[String]) -> ChildHandle
|
|
469
|
+
def run_in_child: (mutant: Mutant, test_files: Array[String], log_paths: Hash[Symbol, String]) -> Integer
|
|
447
470
|
def run_suite: (Array[String], ?timeout: Float) -> ScenarioExecutionResult
|
|
448
471
|
|
|
449
472
|
private
|
|
450
473
|
|
|
451
|
-
def run_in_child: (mutant: Mutant, test_files: Array[String], log_paths: Hash[Symbol, String]) -> Integer
|
|
452
474
|
def run_tests: (Array[String]) -> Integer
|
|
453
475
|
def preload_environment: () -> void
|
|
454
476
|
def setup_load_path: () -> void
|
|
455
477
|
def suppress_minitest_autorun!: () -> nil
|
|
456
478
|
def suppress_simplecov!: () -> void
|
|
457
479
|
def subprocess_env: () -> Hash[String, String]
|
|
480
|
+
def spawn_suite_process: (Array[String], Hash[Symbol, String]) -> Integer
|
|
458
481
|
def cleanup_suite_process: (Integer?, untyped) -> void
|
|
459
482
|
def spec_files: () -> Array[String]
|
|
460
483
|
end
|
|
@@ -480,9 +503,18 @@ module Henitai
|
|
|
480
503
|
end
|
|
481
504
|
|
|
482
505
|
class MutantHistoryStore
|
|
506
|
+
attr_reader path: String
|
|
507
|
+
|
|
483
508
|
def initialize: (path: String) -> void
|
|
484
509
|
def record: (untyped, version: String, ?recorded_at: Time) -> void
|
|
485
510
|
def trend_report: () -> Hash[Symbol, untyped]
|
|
511
|
+
|
|
512
|
+
module Sql
|
|
513
|
+
RUNS_TABLE: String
|
|
514
|
+
MUTANTS_TABLE: String
|
|
515
|
+
INSERT_RUN: String
|
|
516
|
+
UPSERT_MUTANT: String
|
|
517
|
+
end
|
|
486
518
|
end
|
|
487
519
|
|
|
488
520
|
class EquivalenceDetector
|
|
@@ -522,13 +554,41 @@ module Henitai
|
|
|
522
554
|
end
|
|
523
555
|
|
|
524
556
|
class ProcessWorkerRunner
|
|
525
|
-
|
|
557
|
+
attr_reader worker_count: Integer
|
|
558
|
+
attr_reader runtime: untyped
|
|
559
|
+
attr_reader wakeup: untyped
|
|
560
|
+
|
|
561
|
+
def initialize: (worker_count: Integer, ?runtime: untyped, ?wakeup: untyped) -> void
|
|
562
|
+
def flaky_retry_count: () -> Integer
|
|
563
|
+
def shutdown_requested?: () -> bool
|
|
564
|
+
def request_shutdown: () -> void
|
|
565
|
+
def run: (Array[Mutant], untyped, untyped, untyped?, ?Hash[Symbol, untyped]) -> Array[ScenarioExecutionResult]
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
class SlotScheduler
|
|
526
569
|
PROCESS_DRAIN_WINDOW: Float
|
|
527
570
|
|
|
528
571
|
Slot: untyped
|
|
529
572
|
|
|
530
|
-
|
|
531
|
-
|
|
573
|
+
attr_reader flaky_retry_count: Integer
|
|
574
|
+
attr_reader results: Array[ScenarioExecutionResult]
|
|
575
|
+
|
|
576
|
+
def initialize: (
|
|
577
|
+
integration: untyped,
|
|
578
|
+
config: untyped,
|
|
579
|
+
progress_reporter: untyped?,
|
|
580
|
+
options: Hash[Symbol, untyped],
|
|
581
|
+
host: untyped
|
|
582
|
+
) -> void
|
|
583
|
+
def enqueue: (Array[Mutant]) -> Array[Mutant]
|
|
584
|
+
def done?: () -> bool
|
|
585
|
+
def fill_idle_slots: () -> void
|
|
586
|
+
def reap_all_completed_children: () -> void
|
|
587
|
+
def next_event_timeout: () -> Float?
|
|
588
|
+
def check_timeouts: () -> void
|
|
589
|
+
def draining_slots?: () -> bool
|
|
590
|
+
def drain_draining_slots: () -> void
|
|
591
|
+
def interrupt_active_slots: () -> void
|
|
532
592
|
end
|
|
533
593
|
|
|
534
594
|
class StaticFilter
|
|
@@ -563,8 +623,6 @@ module Henitai
|
|
|
563
623
|
end
|
|
564
624
|
|
|
565
625
|
class Mutant::Activator
|
|
566
|
-
SERIALIZER_METHODS: Hash[Symbol, Symbol]
|
|
567
|
-
|
|
568
626
|
def self.activate!: (untyped) -> Symbol?
|
|
569
627
|
def self.activation_source_for: (Mutant) -> String?
|
|
570
628
|
def initialize: () -> void
|
|
@@ -578,6 +636,22 @@ module Henitai
|
|
|
578
636
|
def method_source: (Mutant) -> String
|
|
579
637
|
def body_source: (Mutant) -> String
|
|
580
638
|
def parameter_source: (Mutant) -> String
|
|
639
|
+
def replace_node: (untyped, untyped, untyped) -> untyped
|
|
640
|
+
def same_node?: (untyped, untyped) -> bool
|
|
641
|
+
def replace_child: (untyped, untyped, untyped) -> untyped
|
|
642
|
+
def method_body: (untyped) -> untyped
|
|
643
|
+
def source_file_from_ast: (Subject) -> String?
|
|
644
|
+
def node_location_signature: (untyped) -> Array[untyped]?
|
|
645
|
+
def compile_safe_unparse: (untyped) -> String
|
|
646
|
+
end
|
|
647
|
+
|
|
648
|
+
class Mutant::ParameterSource
|
|
649
|
+
SERIALIZER_METHODS: Hash[Symbol, Symbol]
|
|
650
|
+
|
|
651
|
+
def build: (untyped) -> String
|
|
652
|
+
|
|
653
|
+
private
|
|
654
|
+
|
|
581
655
|
def method_arguments: (untyped) -> untyped
|
|
582
656
|
def parameter_fragment: (untyped) -> String?
|
|
583
657
|
def argument_parameter_fragment: (untyped) -> String
|
|
@@ -589,26 +663,21 @@ module Henitai
|
|
|
589
663
|
def block_parameter_fragment: (untyped) -> String
|
|
590
664
|
def forward_parameter_fragment: (untyped) -> String
|
|
591
665
|
def prefixed_parameter: (untyped, String) -> String
|
|
592
|
-
def replace_node: (untyped, untyped, untyped) -> untyped
|
|
593
|
-
def same_node?: (untyped, untyped) -> bool
|
|
594
|
-
def replace_child: (untyped, untyped, untyped) -> untyped
|
|
595
|
-
def method_body: (untyped) -> untyped
|
|
596
|
-
def source_file_from_ast: (Subject) -> String?
|
|
597
|
-
def node_location_signature: (untyped) -> Array[untyped]?
|
|
598
666
|
def compile_safe_unparse: (untyped) -> String
|
|
599
667
|
end
|
|
600
668
|
|
|
601
669
|
module Reporter
|
|
602
|
-
def self.run_all: (names: Array[String], result: Result, config: Configuration) -> void
|
|
670
|
+
def self.run_all: (names: Array[String], result: Result, config: Configuration, ?history_store: MutantHistoryStore?) -> void
|
|
603
671
|
def self.reporter_class: (String) -> untyped
|
|
604
672
|
|
|
605
673
|
class Base
|
|
606
|
-
def initialize: (config: Configuration) -> void
|
|
674
|
+
def initialize: (config: Configuration, ?history_store: MutantHistoryStore?) -> void
|
|
607
675
|
def report: (Result) -> void
|
|
608
676
|
|
|
609
677
|
private
|
|
610
678
|
|
|
611
679
|
def config: () -> Configuration
|
|
680
|
+
def history_store: () -> MutantHistoryStore?
|
|
612
681
|
end
|
|
613
682
|
|
|
614
683
|
class Terminal < Base
|
|
@@ -656,9 +725,8 @@ module Henitai
|
|
|
656
725
|
def session_snapshot_path: (String) -> String
|
|
657
726
|
def session_recipe_path: (String) -> String
|
|
658
727
|
def canonical_path: () -> String
|
|
659
|
-
def report_path: () -> String
|
|
660
728
|
def write_history_report: () -> void
|
|
661
|
-
def
|
|
729
|
+
def default_history_store: () -> MutantHistoryStore
|
|
662
730
|
def history_report_path: () -> String
|
|
663
731
|
end
|
|
664
732
|
|
|
@@ -719,7 +787,7 @@ module Henitai
|
|
|
719
787
|
attr_reader session_id: String
|
|
720
788
|
attr_reader git_sha: String?
|
|
721
789
|
|
|
722
|
-
def initialize: (mutants: Array[Mutant], started_at: Time, finished_at: Time, ?thresholds: Hash[Symbol, Integer]?, ?partial_rerun: bool, ?survivor_stats: Hash[Symbol, untyped]?, ?session_id: String, ?git_sha: String?) -> void
|
|
790
|
+
def initialize: (mutants: Array[Mutant], started_at: Time, finished_at: Time, ?thresholds: Hash[Symbol, Integer]?, ?partial_rerun: bool, ?survivor_stats: Hash[Symbol, untyped]?, ?session_id: String, ?git_sha: String?, ?source_provider: ^(String) -> String) -> void
|
|
723
791
|
def partial_rerun?: () -> bool
|
|
724
792
|
def killed: () -> Integer
|
|
725
793
|
def survived: () -> Integer
|
|
@@ -814,6 +882,10 @@ module Henitai
|
|
|
814
882
|
def history_store: () -> untyped
|
|
815
883
|
def history_store_path: () -> String
|
|
816
884
|
def source_files: () -> Array[String]
|
|
885
|
+
def included_source_files: () -> Array[String]
|
|
886
|
+
def reject_excluded: (Array[String]) -> Array[String]
|
|
887
|
+
def excluded_source_files: () -> Array[String]
|
|
888
|
+
def filter_changed: (Array[String]) -> Array[String]
|
|
817
889
|
def pattern_subjects: () -> Array[Subject]
|
|
818
890
|
def unique_subjects: (Array[Subject]) -> Array[Subject]
|
|
819
891
|
def normalize_path: (String) -> String
|
|
@@ -821,6 +893,7 @@ module Henitai
|
|
|
821
893
|
private
|
|
822
894
|
|
|
823
895
|
def build_result: (Array[Mutant], Time, Time) -> Result
|
|
896
|
+
def source_provider: () -> ^(String) -> String
|
|
824
897
|
def persist_history: (Result, Time) -> void
|
|
825
898
|
def bootstrap_coverage: (Array[String], ?Array[String]?) -> void
|
|
826
899
|
def bootstrap_mutants: (Array[String]) -> Thread
|
|
@@ -828,8 +901,20 @@ module Henitai
|
|
|
828
901
|
def with_reports_dir: () { () -> untyped } -> untyped
|
|
829
902
|
def result_thresholds: () -> Hash[Symbol, Integer]?
|
|
830
903
|
def survivor_rerun?: () -> bool
|
|
831
|
-
def
|
|
904
|
+
def survivor_strategy: () -> SurvivorRerunStrategy
|
|
905
|
+
def safe_head_sha: () -> String?
|
|
906
|
+
end
|
|
907
|
+
|
|
908
|
+
class SurvivorRerunStrategy
|
|
909
|
+
attr_reader survivor_stats: Hash[Symbol, untyped]?
|
|
910
|
+
|
|
911
|
+
def initialize: (survivors_from: String?, config: Configuration, git_diff_analyzer: untyped) -> void
|
|
912
|
+
def active?: () -> bool
|
|
832
913
|
def try_recipe_run: () -> Array[Mutant]?
|
|
914
|
+
def apply_selection: (Array[Mutant]) -> Array[Mutant]
|
|
915
|
+
|
|
916
|
+
private
|
|
917
|
+
|
|
833
918
|
def load_survivor_report: () -> SurvivorLoader::Report
|
|
834
919
|
def run_from_recipes: (SurvivorLoader::Report, Array[String]?) -> Array[Mutant]?
|
|
835
920
|
def recipe_fast_path_safe?: (SurvivorLoader::Report, Array[String]?) -> bool
|
|
@@ -843,10 +928,10 @@ module Henitai
|
|
|
843
928
|
def dirty_source_files?: (Array[String]?, ?git_sha: String?) -> bool
|
|
844
929
|
def committed_changed_files: (String?) -> Array[String]
|
|
845
930
|
def in_include_root?: (String, Array[String]) -> bool
|
|
931
|
+
def normalize_path: (String) -> String
|
|
846
932
|
def warn_survivor_drift: (SurvivorSelector) -> void
|
|
847
933
|
def build_survivor_stats: (SurvivorSelector, Array[Mutant], Hash[Symbol, Array[Mutant]]) -> Hash[Symbol, untyped]
|
|
848
934
|
def test_filter: (SurvivorLoader::Report, ?dirty_source_files: bool) -> SurvivorTestFilter
|
|
849
|
-
def safe_head_sha: () -> String?
|
|
850
935
|
end
|
|
851
936
|
|
|
852
937
|
class CoverageBootstrapper
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: henitai
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Martin Otten
|
|
@@ -104,8 +104,16 @@ files:
|
|
|
104
104
|
- lib/henitai/arid_node_filter.rb
|
|
105
105
|
- lib/henitai/available_cpu_count.rb
|
|
106
106
|
- lib/henitai/cli.rb
|
|
107
|
+
- lib/henitai/cli/clean_command.rb
|
|
108
|
+
- lib/henitai/cli/command_support.rb
|
|
109
|
+
- lib/henitai/cli/init_command.rb
|
|
110
|
+
- lib/henitai/cli/operator_command.rb
|
|
111
|
+
- lib/henitai/cli/options.rb
|
|
112
|
+
- lib/henitai/cli/run_command.rb
|
|
107
113
|
- lib/henitai/configuration.rb
|
|
108
114
|
- lib/henitai/configuration_validator.rb
|
|
115
|
+
- lib/henitai/configuration_validator/rules.rb
|
|
116
|
+
- lib/henitai/configuration_validator/scalars.rb
|
|
109
117
|
- lib/henitai/coverage_bootstrapper.rb
|
|
110
118
|
- lib/henitai/coverage_formatter.rb
|
|
111
119
|
- lib/henitai/coverage_report_reader.rb
|
|
@@ -114,14 +122,25 @@ files:
|
|
|
114
122
|
- lib/henitai/execution_engine.rb
|
|
115
123
|
- lib/henitai/git_diff_analyzer.rb
|
|
116
124
|
- lib/henitai/integration.rb
|
|
125
|
+
- lib/henitai/integration/base.rb
|
|
126
|
+
- lib/henitai/integration/child_debug_support.rb
|
|
127
|
+
- lib/henitai/integration/child_runtime_control.rb
|
|
128
|
+
- lib/henitai/integration/coverage_suppression.rb
|
|
129
|
+
- lib/henitai/integration/minitest.rb
|
|
130
|
+
- lib/henitai/integration/mutant_run_support.rb
|
|
131
|
+
- lib/henitai/integration/rspec_child_runner.rb
|
|
117
132
|
- lib/henitai/integration/rspec_process_runner.rb
|
|
133
|
+
- lib/henitai/integration/rspec_test_selection.rb
|
|
134
|
+
- lib/henitai/integration/scenario_log_support.rb
|
|
118
135
|
- lib/henitai/minitest_coverage_hook.rb
|
|
119
136
|
- lib/henitai/minitest_coverage_reporter.rb
|
|
120
137
|
- lib/henitai/minitest_simplecov.rb
|
|
121
138
|
- lib/henitai/mutant.rb
|
|
122
139
|
- lib/henitai/mutant/activator.rb
|
|
140
|
+
- lib/henitai/mutant/parameter_source.rb
|
|
123
141
|
- lib/henitai/mutant_generator.rb
|
|
124
142
|
- lib/henitai/mutant_history_store.rb
|
|
143
|
+
- lib/henitai/mutant_history_store/sql.rb
|
|
125
144
|
- lib/henitai/mutant_identity.rb
|
|
126
145
|
- lib/henitai/operator.rb
|
|
127
146
|
- lib/henitai/operators.rb
|
|
@@ -156,6 +175,9 @@ files:
|
|
|
156
175
|
- lib/henitai/runner.rb
|
|
157
176
|
- lib/henitai/sampling_strategy.rb
|
|
158
177
|
- lib/henitai/scenario_execution_result.rb
|
|
178
|
+
- lib/henitai/slot_scheduler.rb
|
|
179
|
+
- lib/henitai/slot_scheduler/draining.rb
|
|
180
|
+
- lib/henitai/slot_scheduler/process_control.rb
|
|
159
181
|
- lib/henitai/source_parser.rb
|
|
160
182
|
- lib/henitai/static_filter.rb
|
|
161
183
|
- lib/henitai/stillborn_filter.rb
|
|
@@ -163,6 +185,7 @@ files:
|
|
|
163
185
|
- lib/henitai/subject_resolver.rb
|
|
164
186
|
- lib/henitai/survivor_activation_cache.rb
|
|
165
187
|
- lib/henitai/survivor_loader.rb
|
|
188
|
+
- lib/henitai/survivor_rerun_strategy.rb
|
|
166
189
|
- lib/henitai/survivor_selector.rb
|
|
167
190
|
- lib/henitai/survivor_test_filter.rb
|
|
168
191
|
- lib/henitai/syntax_validator.rb
|
|
@@ -181,7 +204,7 @@ metadata:
|
|
|
181
204
|
changelog_uri: https://github.com/martinotten/henitai/blob/main/CHANGELOG.md
|
|
182
205
|
documentation_uri: https://github.com/martinotten/henitai/blob/main/README.md
|
|
183
206
|
homepage_uri: https://github.com/martinotten/henitai
|
|
184
|
-
source_code_uri: https://github.com/martinotten/henitai/tree/v0.1
|
|
207
|
+
source_code_uri: https://github.com/martinotten/henitai/tree/v0.2.1
|
|
185
208
|
rubygems_mfa_required: 'true'
|
|
186
209
|
rdoc_options: []
|
|
187
210
|
require_paths:
|