henitai 0.2.1 → 0.3.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 +106 -1
- data/README.md +125 -3
- data/assets/schema/henitai.schema.json +35 -0
- data/lib/henitai/available_cpu_count.rb +16 -23
- data/lib/henitai/canonical_report_merger.rb +107 -0
- data/lib/henitai/canonical_report_writer.rb +22 -0
- data/lib/henitai/checkpoint_reporter.rb +79 -0
- data/lib/henitai/cli/clean_command.rb +14 -8
- data/lib/henitai/cli/command_support.rb +2 -1
- data/lib/henitai/cli/operator_command.rb +2 -1
- data/lib/henitai/cli/options.rb +21 -57
- data/lib/henitai/cli/run_command.rb +36 -3
- data/lib/henitai/cli/run_options.rb +108 -0
- data/lib/henitai/cli.rb +12 -4
- data/lib/henitai/composite_progress_reporter.rb +42 -0
- data/lib/henitai/configuration.rb +41 -9
- data/lib/henitai/configuration_validator/rules.rb +18 -0
- data/lib/henitai/configuration_validator/scalars.rb +46 -0
- data/lib/henitai/configuration_validator.rb +8 -1
- data/lib/henitai/coverage_bootstrapper.rb +54 -5
- data/lib/henitai/coverage_formatter.rb +5 -1
- data/lib/henitai/coverage_report_reader.rb +28 -5
- data/lib/henitai/execution_engine/env_scope.rb +67 -0
- data/lib/henitai/execution_engine.rb +111 -50
- data/lib/henitai/generated_artifacts.rb +58 -0
- data/lib/henitai/incremental_filter.rb +100 -0
- data/lib/henitai/integration/child_debug_support.rb +6 -2
- data/lib/henitai/integration/coverage_suppression.rb +9 -0
- data/lib/henitai/integration/minitest.rb +11 -43
- data/lib/henitai/integration/minitest_load_path.rb +14 -0
- data/lib/henitai/integration/minitest_suite_command.rb +17 -0
- data/lib/henitai/integration/minitest_test_runner.rb +39 -0
- data/lib/henitai/integration/rails_environment_preloader.rb +14 -0
- data/lib/henitai/integration/rspec_child_runner.rb +3 -3
- data/lib/henitai/integration/rspec_test_selection.rb +3 -0
- data/lib/henitai/integration/scenario_log_support.rb +67 -20
- data/lib/henitai/minitest_coverage_reporter.rb +4 -1
- data/lib/henitai/mutant/activator.rb +14 -0
- data/lib/henitai/mutant.rb +13 -6
- data/lib/henitai/mutant_history_store/sql.rb +21 -3
- data/lib/henitai/mutant_history_store/verdict_cache.rb +84 -0
- data/lib/henitai/mutant_history_store.rb +62 -12
- data/lib/henitai/mutant_identity.rb +33 -2
- data/lib/henitai/mutation_skip_directives.rb +227 -0
- data/lib/henitai/operator.rb +3 -1
- data/lib/henitai/operators/equality_identity_operator.rb +51 -0
- data/lib/henitai/operators/equality_operator.rb +8 -3
- data/lib/henitai/operators.rb +1 -0
- data/lib/henitai/per_test_coverage.rb +81 -0
- data/lib/henitai/per_test_coverage_collector.rb +20 -5
- data/lib/henitai/per_test_coverage_selector.rb +11 -33
- data/lib/henitai/reporter/dashboard_metadata_provider.rb +113 -0
- data/lib/henitai/reporter.rb +248 -117
- data/lib/henitai/reports_directory_lock.rb +76 -0
- data/lib/henitai/result.rb +75 -10
- data/lib/henitai/runner.rb +102 -43
- data/lib/henitai/scenario_execution_result.rb +12 -0
- data/lib/henitai/slot_scheduler/draining.rb +21 -15
- data/lib/henitai/slot_scheduler.rb +73 -15
- data/lib/henitai/static_filter.rb +16 -6
- data/lib/henitai/survivor_rerun_strategy.rb +1 -1
- data/lib/henitai/survivor_test_filter.rb +1 -1
- data/lib/henitai/test_prioritizer.rb +28 -2
- data/lib/henitai/timeout_calibrator.rb +44 -0
- data/lib/henitai/verdict_fingerprint.rb +155 -0
- data/lib/henitai/version.rb +1 -1
- data/lib/henitai.rb +14 -1
- data/sig/henitai.rbs +235 -25
- metadata +22 -3
- data/lib/henitai/parallel_execution_runner.rb +0 -153
data/sig/henitai.rbs
CHANGED
|
@@ -67,6 +67,9 @@ module Henitai
|
|
|
67
67
|
class CoverageError < StandardError
|
|
68
68
|
end
|
|
69
69
|
|
|
70
|
+
class ConcurrentRunError < StandardError
|
|
71
|
+
end
|
|
72
|
+
|
|
70
73
|
class GitDiffError < StandardError
|
|
71
74
|
end
|
|
72
75
|
|
|
@@ -140,10 +143,15 @@ module Henitai
|
|
|
140
143
|
|
|
141
144
|
class Configuration
|
|
142
145
|
DEFAULT_TIMEOUT: Float
|
|
146
|
+
DEFAULT_TIMEOUT_MULTIPLIER: Float
|
|
143
147
|
DEFAULT_OPERATORS: Symbol
|
|
144
148
|
DEFAULT_JOBS: untyped
|
|
145
149
|
DEFAULT_MAX_MUTANTS_PER_LINE: Integer
|
|
146
150
|
DEFAULT_MAX_FLAKY_RETRIES: Integer
|
|
151
|
+
DEFAULT_MAX_LOG_BYTES: Integer
|
|
152
|
+
DEFAULT_MAX_TIMEOUT: Float
|
|
153
|
+
DEFAULT_CHECKPOINT_EVERY: Integer
|
|
154
|
+
DEFAULT_CHECKPOINT_INTERVAL: Float
|
|
147
155
|
DEFAULT_REPORTS_DIR: String
|
|
148
156
|
DEFAULT_COVERAGE_CRITERIA: Hash[Symbol, bool]
|
|
149
157
|
DEFAULT_THRESHOLDS: Hash[Symbol, Integer]
|
|
@@ -152,22 +160,30 @@ module Henitai
|
|
|
152
160
|
attr_reader integration: untyped
|
|
153
161
|
attr_reader includes: Array[String]
|
|
154
162
|
attr_reader excludes: Array[String]
|
|
163
|
+
attr_reader test_excludes: Array[String]
|
|
155
164
|
attr_reader operators: Symbol
|
|
156
165
|
attr_reader timeout: Float
|
|
166
|
+
attr_reader timeout_multiplier: Float
|
|
157
167
|
attr_reader ignore_patterns: Array[untyped]
|
|
158
168
|
attr_reader max_mutants_per_line: Integer
|
|
159
169
|
attr_reader max_flaky_retries: Integer
|
|
170
|
+
attr_reader max_log_bytes: Integer
|
|
171
|
+
attr_reader max_timeout: Float
|
|
160
172
|
attr_reader sampling: untyped
|
|
161
173
|
attr_reader jobs: untyped
|
|
162
174
|
attr_reader coverage_criteria: Hash[Symbol, untyped]
|
|
163
175
|
attr_reader thresholds: Hash[Symbol, Integer]
|
|
164
176
|
attr_reader reporters: Array[String]
|
|
165
177
|
attr_reader reports_dir: String
|
|
178
|
+
attr_reader checkpoint_enabled: bool
|
|
179
|
+
attr_reader checkpoint_every: Integer
|
|
180
|
+
attr_reader checkpoint_interval: Float
|
|
166
181
|
attr_reader dashboard: Hash[Symbol, untyped]
|
|
167
182
|
attr_reader all_logs: bool
|
|
168
183
|
|
|
169
184
|
def self.load: (?path: String, ?overrides: Hash[Symbol, untyped]) -> Configuration
|
|
170
185
|
def initialize: (?path: String, ?overrides: Hash[Symbol, untyped]) -> void
|
|
186
|
+
def timeout_configured?: () -> bool
|
|
171
187
|
|
|
172
188
|
private
|
|
173
189
|
|
|
@@ -176,6 +192,8 @@ module Henitai
|
|
|
176
192
|
def apply_defaults: (Hash[Symbol, untyped]) -> void
|
|
177
193
|
def apply_general_defaults: (Hash[Symbol, untyped]) -> void
|
|
178
194
|
def apply_mutation_defaults: (Hash[Symbol, untyped]) -> void
|
|
195
|
+
def apply_mutation_limit_defaults: (Hash[Symbol, untyped]) -> void
|
|
196
|
+
def apply_reports_defaults: (Hash[Symbol, untyped]) -> void
|
|
179
197
|
def apply_analysis_defaults: (Hash[Symbol, untyped]) -> void
|
|
180
198
|
def merge_defaults: (Hash[Symbol, untyped], Hash[Symbol, untyped]?) -> Hash[Symbol, untyped]
|
|
181
199
|
def resolve_integration_default: (untyped) -> untyped
|
|
@@ -225,6 +243,8 @@ module Henitai
|
|
|
225
243
|
end
|
|
226
244
|
|
|
227
245
|
class Mutant
|
|
246
|
+
include UnparseHelper
|
|
247
|
+
|
|
228
248
|
STATUSES: Array[Symbol]
|
|
229
249
|
|
|
230
250
|
attr_reader id: String
|
|
@@ -240,11 +260,15 @@ module Henitai
|
|
|
240
260
|
attr_accessor duration: Float?
|
|
241
261
|
attr_accessor covered_by: Array[String]?
|
|
242
262
|
attr_accessor tests_completed: Integer?
|
|
263
|
+
attr_accessor ignore_reason: String?
|
|
264
|
+
attr_accessor from_cache: bool
|
|
243
265
|
attr_reader precomputed_stable_id: String?
|
|
244
266
|
attr_reader precomputed_activation_source: String?
|
|
245
267
|
|
|
246
268
|
def initialize: (subject: Subject, operator: String, nodes: Hash[Symbol, untyped], description: String, location: Hash[Symbol, untyped], ?precomputed_stable_id: String?, ?precomputed_activation_source: String?) -> void
|
|
247
269
|
def stable_id: () -> String
|
|
270
|
+
def mutated_source: () -> String
|
|
271
|
+
def from_cache?: () -> bool
|
|
248
272
|
def killed?: () -> bool
|
|
249
273
|
def survived?: () -> bool
|
|
250
274
|
def pending?: () -> bool
|
|
@@ -263,7 +287,7 @@ module Henitai
|
|
|
263
287
|
REPORT_FILE_NAME: String
|
|
264
288
|
|
|
265
289
|
def initialize: () -> void
|
|
266
|
-
def record_test: (String) -> void
|
|
290
|
+
def record_test: (String, ?duration: Float?) -> void
|
|
267
291
|
def write_report: () -> void
|
|
268
292
|
|
|
269
293
|
private
|
|
@@ -304,9 +328,26 @@ module Henitai
|
|
|
304
328
|
def sample: (Array[Mutant], ratio: Float, ?strategy: Symbol) -> Array[Mutant]
|
|
305
329
|
end
|
|
306
330
|
|
|
331
|
+
class TimeoutCalibrator
|
|
332
|
+
FLOOR_SECONDS: Float
|
|
333
|
+
|
|
334
|
+
def initialize: (timing_source: untyped, multiplier: untyped) -> void
|
|
335
|
+
def timeout_for: (untyped) -> Float?
|
|
336
|
+
|
|
337
|
+
private
|
|
338
|
+
|
|
339
|
+
def durations: () -> Hash[String, untyped]
|
|
340
|
+
def normalize: (untyped) -> String
|
|
341
|
+
end
|
|
342
|
+
|
|
307
343
|
class TestPrioritizer
|
|
308
|
-
def initialize: () -> void
|
|
344
|
+
def initialize: (?timing_source: untyped?) -> void
|
|
309
345
|
def sort: (Array[String], untyped, Hash[untyped, untyped]) -> Array[String]
|
|
346
|
+
|
|
347
|
+
private
|
|
348
|
+
|
|
349
|
+
def runtime: (untyped) -> Float
|
|
350
|
+
def timing_durations: () -> Hash[String, untyped]
|
|
310
351
|
end
|
|
311
352
|
|
|
312
353
|
class Operator
|
|
@@ -500,20 +541,29 @@ module Henitai
|
|
|
500
541
|
|
|
501
542
|
module MutantIdentity
|
|
502
543
|
def self.stable_id: (Mutant) -> String
|
|
544
|
+
def self.legacy_stable_id: (Mutant) -> String
|
|
503
545
|
end
|
|
504
546
|
|
|
505
547
|
class MutantHistoryStore
|
|
506
548
|
attr_reader path: String
|
|
507
549
|
|
|
508
|
-
def initialize: (path: String) -> void
|
|
550
|
+
def initialize: (path: String, ?per_test_coverage: PerTestCoverage?) -> void
|
|
509
551
|
def record: (untyped, version: String, ?recorded_at: Time) -> void
|
|
552
|
+
def verdict_for: (String) -> Hash[Symbol, untyped]?
|
|
553
|
+
def killed_verdict_for: (String) -> Hash[Symbol, untyped]?
|
|
510
554
|
def trend_report: () -> Hash[Symbol, untyped]
|
|
511
555
|
|
|
512
556
|
module Sql
|
|
513
557
|
RUNS_TABLE: String
|
|
514
558
|
MUTANTS_TABLE: String
|
|
559
|
+
MIGRATION_COLUMNS: Hash[String, String]
|
|
515
560
|
INSERT_RUN: String
|
|
516
561
|
UPSERT_MUTANT: String
|
|
562
|
+
VERDICT_LOOKUP: String
|
|
563
|
+
end
|
|
564
|
+
|
|
565
|
+
module VerdictCache
|
|
566
|
+
CACHEABLE_STATUSES: Array[String]
|
|
517
567
|
end
|
|
518
568
|
end
|
|
519
569
|
|
|
@@ -546,11 +596,7 @@ module Henitai
|
|
|
546
596
|
class CoverageReportReader
|
|
547
597
|
def coverage_lines_by_file: (?String) -> Hash[String, Array[Integer]]
|
|
548
598
|
def test_lines_by_file: (?String) -> Hash[String, Hash[String, Array[Integer]]]
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
class ParallelExecutionRunner
|
|
552
|
-
def initialize: (worker_count: Integer) -> void
|
|
553
|
-
def run: (Array[Mutant], untyped, untyped, untyped, ?Hash[Symbol, untyped]) -> void
|
|
599
|
+
def durations_by_test: (?String) -> Hash[String, Float]
|
|
554
600
|
end
|
|
555
601
|
|
|
556
602
|
class ProcessWorkerRunner
|
|
@@ -567,6 +613,7 @@ module Henitai
|
|
|
567
613
|
|
|
568
614
|
class SlotScheduler
|
|
569
615
|
PROCESS_DRAIN_WINDOW: Float
|
|
616
|
+
WORKER_SLOT_ENV: String
|
|
570
617
|
|
|
571
618
|
Slot: untyped
|
|
572
619
|
|
|
@@ -591,17 +638,107 @@ module Henitai
|
|
|
591
638
|
def interrupt_active_slots: () -> void
|
|
592
639
|
end
|
|
593
640
|
|
|
641
|
+
class IncrementalFilter
|
|
642
|
+
def initialize: (history_store: untyped, ?per_test_coverage: PerTestCoverage?, ?dependency_fingerprint: String?) -> void
|
|
643
|
+
def apply: (Array[Mutant]) -> Array[Mutant]
|
|
644
|
+
|
|
645
|
+
private
|
|
646
|
+
|
|
647
|
+
def history_store: () -> untyped
|
|
648
|
+
def per_test_coverage: () -> PerTestCoverage?
|
|
649
|
+
def dependency_fingerprint: () -> String?
|
|
650
|
+
def ambiguous_stable_ids: (Array[Mutant]) -> Set[String]
|
|
651
|
+
def reusable_status: (Mutant) -> Symbol?
|
|
652
|
+
def killed_reusable?: (Mutant, Hash[Symbol, untyped]) -> bool
|
|
653
|
+
def survived_reusable?: (Mutant, Hash[Symbol, untyped]) -> bool
|
|
654
|
+
def subject_source_unchanged?: (Mutant, Hash[Symbol, untyped]) -> bool
|
|
655
|
+
end
|
|
656
|
+
|
|
657
|
+
module VerdictFingerprint
|
|
658
|
+
DEPENDENCY_GLOBS: Array[String]
|
|
659
|
+
|
|
660
|
+
def self?.subject_source_hash: (untyped) -> String?
|
|
661
|
+
def self?.tests_fingerprint: (untyped) -> String?
|
|
662
|
+
def self?.tests_fingerprint_current?: (String?) -> bool
|
|
663
|
+
def self?.dependency_fingerprint: (?String) -> String?
|
|
664
|
+
def self?.survivor_tests_fingerprint: (untyped, dependency_sha: String?) -> String?
|
|
665
|
+
def self?.survivor_fingerprint_current?: (String?, live_paths: Array[String], dependency_sha: String?) -> bool
|
|
666
|
+
def self?.survivor_fingerprint_matches?: (untyped, Array[String], String?) -> bool
|
|
667
|
+
def self?.combined_content_sha: (untyped) -> String?
|
|
668
|
+
end
|
|
669
|
+
|
|
670
|
+
module CanonicalReportMerger
|
|
671
|
+
def self.merge: (Hash[Symbol, untyped], String, ?prune_missing: bool) -> Hash[String, untyped]
|
|
672
|
+
end
|
|
673
|
+
|
|
674
|
+
module CanonicalReportWriter
|
|
675
|
+
def self.write: (Hash[Symbol, untyped], path: String, authoritative: bool) -> Hash[untyped, untyped]
|
|
676
|
+
end
|
|
677
|
+
|
|
678
|
+
class ReportsDirectoryLock
|
|
679
|
+
LOCK_FILENAME: String
|
|
680
|
+
|
|
681
|
+
def initialize: (reports_dir: String) -> void
|
|
682
|
+
def synchronize: () { () -> untyped } -> untyped
|
|
683
|
+
|
|
684
|
+
private
|
|
685
|
+
|
|
686
|
+
def lock_path: () -> String
|
|
687
|
+
def acquire: (File) -> void
|
|
688
|
+
def owner_pid: (File) -> (Integer | String)
|
|
689
|
+
def contention_message: (Integer | String) -> String
|
|
690
|
+
def write_owner: (File) -> untyped
|
|
691
|
+
end
|
|
692
|
+
|
|
693
|
+
class CheckpointReporter
|
|
694
|
+
def initialize: (config: untyped, source_provider: untyped, authoritative: bool, ?started_at: untyped, ?clock: untyped) -> void
|
|
695
|
+
def progress: (untyped, ?scenario_result: untyped) -> void
|
|
696
|
+
end
|
|
697
|
+
|
|
698
|
+
class CompositeProgressReporter
|
|
699
|
+
def self.for: (config: untyped, source_provider: untyped, full_run: bool) -> untyped?
|
|
700
|
+
def initialize: (Array[untyped]) -> void
|
|
701
|
+
def progress: (untyped, ?scenario_result: untyped) -> void
|
|
702
|
+
end
|
|
703
|
+
|
|
704
|
+
class MutationSkipDirectives
|
|
705
|
+
def skip?: (Mutant) -> bool
|
|
706
|
+
def directive_for: (Mutant) -> untyped
|
|
707
|
+
end
|
|
708
|
+
|
|
594
709
|
class StaticFilter
|
|
595
|
-
def initialize: (?coverage_report_reader: CoverageReportReader) -> void
|
|
710
|
+
def initialize: (?coverage_report_reader: CoverageReportReader, ?skip_directives: MutationSkipDirectives) -> void
|
|
596
711
|
def apply: (Array[Mutant], untyped) -> Array[Mutant]
|
|
597
712
|
def coverage_lines_for: (untyped) -> Hash[String, Array[Integer]]
|
|
598
713
|
def coverage_lines_by_file: (?String) -> Hash[String, Array[Integer]]
|
|
599
714
|
def test_lines_by_file: (?String) -> Hash[String, Hash[String, Array[Integer]]]
|
|
600
715
|
end
|
|
601
716
|
|
|
717
|
+
class PerTestCoverage
|
|
718
|
+
def initialize: (reports_dir: String, ?coverage_report_reader: CoverageReportReader) -> void
|
|
719
|
+
def available?: () -> bool
|
|
720
|
+
def tests_covering: (untyped) -> Array[String]
|
|
721
|
+
def source_files_covered_by: (untyped) -> Array[String]
|
|
722
|
+
def covers?: (String, untyped) -> bool
|
|
723
|
+
|
|
724
|
+
private
|
|
725
|
+
|
|
726
|
+
def reports_dir: () -> String
|
|
727
|
+
def coverage_report_reader: () -> CoverageReportReader
|
|
728
|
+
def location_available?: (untyped) -> bool
|
|
729
|
+
def coverage_lines_for: (String, untyped) -> Array[Integer]
|
|
730
|
+
def mutant_lines: (untyped) -> Array[Integer]
|
|
731
|
+
def map: () -> Hash[String, Hash[String, Array[Integer]]]
|
|
732
|
+
end
|
|
733
|
+
|
|
602
734
|
class PerTestCoverageSelector
|
|
603
735
|
def initialize: (?coverage_report_reader: CoverageReportReader) -> void
|
|
604
736
|
def filter: (Array[String], Mutant, reports_dir: String) -> Array[String]
|
|
737
|
+
|
|
738
|
+
private
|
|
739
|
+
|
|
740
|
+
def per_test_coverage: (String) -> PerTestCoverage
|
|
741
|
+
def coverage_report_reader: () -> CoverageReportReader
|
|
605
742
|
end
|
|
606
743
|
|
|
607
744
|
class ExecutionEngine
|
|
@@ -609,13 +746,16 @@ module Henitai
|
|
|
609
746
|
|
|
610
747
|
private
|
|
611
748
|
|
|
749
|
+
def execute: (Array[Mutant], untyped, untyped, untyped?) -> Array[Mutant]
|
|
750
|
+
def with_worker_slot: () { () -> untyped } -> untyped
|
|
612
751
|
def parallel_execution?: (untyped, Array[Mutant]) -> bool
|
|
613
752
|
def worker_count: (untyped) -> Integer
|
|
614
753
|
def run_linear: (Array[Mutant], untyped, untyped, untyped?, untyped) -> void
|
|
615
754
|
def run_parallel: (Array[Mutant], untyped, untyped, untyped?) -> void
|
|
616
755
|
def process_mutant: (Mutant, untyped, untyped, untyped?, ?untyped) -> void
|
|
617
756
|
def prioritized_tests_for: (Mutant, untyped, untyped) -> Array[String]
|
|
618
|
-
def test_prioritizer: () -> TestPrioritizer
|
|
757
|
+
def test_prioritizer: (untyped) -> TestPrioritizer
|
|
758
|
+
def timing_source: (untyped) -> untyped
|
|
619
759
|
def test_history: (untyped) -> Hash[untyped, untyped]
|
|
620
760
|
def run_with_flaky_retry: (Mutant, untyped, untyped, Array[String], ?untyped) -> ScenarioExecutionResult
|
|
621
761
|
def warn_flaky_mutants: (Integer) -> void
|
|
@@ -678,6 +818,8 @@ module Henitai
|
|
|
678
818
|
|
|
679
819
|
def config: () -> Configuration
|
|
680
820
|
def history_store: () -> MutantHistoryStore?
|
|
821
|
+
def authoritative?: (untyped) -> bool
|
|
822
|
+
def canonical_path: () -> String
|
|
681
823
|
end
|
|
682
824
|
|
|
683
825
|
class Terminal < Base
|
|
@@ -685,11 +827,13 @@ module Henitai
|
|
|
685
827
|
|
|
686
828
|
PROGRESS_GLYPHS: Hash[Symbol, String]
|
|
687
829
|
|
|
830
|
+
def initialize: (config: Configuration, ?history_store: MutantHistoryStore?, ?color_enabled: bool) -> void
|
|
688
831
|
def report: (Result) -> void
|
|
689
832
|
def progress: (untyped, ?scenario_result: ScenarioExecutionResult) -> void
|
|
690
833
|
|
|
691
834
|
private
|
|
692
835
|
|
|
836
|
+
def color_enabled: () -> bool
|
|
693
837
|
def report_lines: (Result) -> Array[String]
|
|
694
838
|
def summary_lines: (untyped) -> Array[String]
|
|
695
839
|
def full_summary_lines: (untyped) -> Array[String]
|
|
@@ -701,8 +845,15 @@ module Henitai
|
|
|
701
845
|
def original_line: (Mutant) -> String
|
|
702
846
|
def mutated_line: (Mutant) -> String
|
|
703
847
|
def display_unparse: (untyped) -> String
|
|
848
|
+
def display_mutated_source: (untyped) -> String
|
|
849
|
+
def str_node?: (untyped) -> bool
|
|
850
|
+
def source_slice: (untyped) -> String?
|
|
704
851
|
def score_line: (Result) -> String
|
|
705
852
|
def format_row: (String, untyped) -> String
|
|
853
|
+
def reused_verdicts_line: (Result) -> String?
|
|
854
|
+
def reused_mutants: (Result) -> Array[Mutant]
|
|
855
|
+
def executed_only_score_line: (Result) -> String?
|
|
856
|
+
def empty_since_scope_line: (Result) -> String?
|
|
706
857
|
def count_status: (Result, Symbol) -> Integer
|
|
707
858
|
def format_duration: (Float) -> String
|
|
708
859
|
def format_percent: (Float?) -> String
|
|
@@ -718,13 +869,12 @@ module Henitai
|
|
|
718
869
|
|
|
719
870
|
private
|
|
720
871
|
|
|
721
|
-
def write_canonical: (Hash[Symbol, untyped]) -> void
|
|
872
|
+
def write_canonical: (Hash[Symbol, untyped], authoritative: bool) -> void
|
|
722
873
|
def write_session_snapshot: (Hash[Symbol, untyped]) -> void
|
|
723
874
|
def write_activation_recipes: (untyped) -> void
|
|
724
875
|
def survived_mutants_for: (untyped) -> Array[Mutant]
|
|
725
876
|
def session_snapshot_path: (String) -> String
|
|
726
877
|
def session_recipe_path: (String) -> String
|
|
727
|
-
def canonical_path: () -> String
|
|
728
878
|
def write_history_report: () -> void
|
|
729
879
|
def default_history_store: () -> MutantHistoryStore
|
|
730
880
|
def history_report_path: () -> String
|
|
@@ -732,22 +882,74 @@ module Henitai
|
|
|
732
882
|
|
|
733
883
|
class Html < Base
|
|
734
884
|
def report: (Result) -> void
|
|
885
|
+
def report_schema: (Hash[untyped, untyped]) -> void
|
|
735
886
|
|
|
736
887
|
private
|
|
737
888
|
|
|
738
889
|
def report_path: () -> String
|
|
739
|
-
def html_document: (
|
|
740
|
-
def
|
|
890
|
+
def html_document: (Hash[untyped, untyped]) -> String
|
|
891
|
+
def schema_for: (Result) -> Hash[untyped, untyped]
|
|
892
|
+
def escaped_report_json: (Hash[untyped, untyped]) -> String
|
|
893
|
+
end
|
|
894
|
+
|
|
895
|
+
class DryRun < Base
|
|
896
|
+
def initialize: (config: Configuration, ?history_store: MutantHistoryStore?, ?io: untyped) -> void
|
|
897
|
+
def report: (untyped) -> void
|
|
898
|
+
|
|
899
|
+
private
|
|
900
|
+
|
|
901
|
+
def io: () -> untyped
|
|
902
|
+
def listing_lines: (untyped) -> Array[String]
|
|
903
|
+
def grouped_lines: (untyped) -> Array[String]
|
|
904
|
+
def subject_label: (untyped) -> String
|
|
905
|
+
def mutant_line: (untyped) -> String
|
|
906
|
+
def ignore_reason_for: (untyped) -> String?
|
|
907
|
+
def summary_line: (untyped) -> String
|
|
908
|
+
end
|
|
909
|
+
|
|
910
|
+
class Github < Base
|
|
911
|
+
def initialize: (config: Configuration, ?history_store: MutantHistoryStore?, ?io: untyped) -> void
|
|
912
|
+
def report: (Result) -> void
|
|
913
|
+
|
|
914
|
+
private
|
|
915
|
+
|
|
916
|
+
def io: () -> untyped
|
|
917
|
+
def annotation_line: (Mutant) -> String
|
|
918
|
+
def relative_path: (String) -> String
|
|
919
|
+
def escape_message: (String) -> String
|
|
920
|
+
end
|
|
921
|
+
|
|
922
|
+
class DashboardMetadataProvider
|
|
923
|
+
def initialize: (dashboard_config: Hash[Symbol, untyped]?, ?env: untyped, ?git_executor: untyped) -> void
|
|
924
|
+
def project: () -> String?
|
|
925
|
+
def version: () -> String?
|
|
926
|
+
def api_key: () -> String?
|
|
927
|
+
|
|
928
|
+
private
|
|
929
|
+
|
|
930
|
+
def env_version: () -> String?
|
|
931
|
+
def ref_without_prefix: (String?) -> String?
|
|
932
|
+
def project_from_git_remote: () -> String?
|
|
933
|
+
def blank?: (String?) -> bool
|
|
934
|
+
def git_remote_url: () -> String?
|
|
935
|
+
def git_branch_name: () -> String?
|
|
936
|
+
|
|
937
|
+
def self.project_from_git_url: (String?) -> String?
|
|
938
|
+
def self.normalize_git_url: (String?) -> String?
|
|
939
|
+
def self.project_from_uri_url: (String) -> String?
|
|
940
|
+
def self.project_from_ssh_url: (String) -> String?
|
|
741
941
|
end
|
|
742
942
|
|
|
743
943
|
class Dashboard < Base
|
|
744
944
|
DEFAULT_BASE_URL: String
|
|
745
945
|
HTTP_TIMEOUT_SECONDS: Integer
|
|
746
946
|
|
|
947
|
+
def initialize: (config: Configuration, ?history_store: MutantHistoryStore?, ?metadata_provider: DashboardMetadataProvider?) -> void
|
|
747
948
|
def report: (Result) -> void
|
|
748
949
|
|
|
749
950
|
private
|
|
750
951
|
|
|
952
|
+
def metadata_provider: () -> DashboardMetadataProvider
|
|
751
953
|
def ready?: () -> bool
|
|
752
954
|
def build_request: (Result, untyped) -> untyped
|
|
753
955
|
def request_headers: () -> Hash[String, String]
|
|
@@ -756,20 +958,11 @@ module Henitai
|
|
|
756
958
|
def base_url: () -> String
|
|
757
959
|
def project: () -> String?
|
|
758
960
|
def version: () -> String?
|
|
759
|
-
def env_version: () -> String?
|
|
760
|
-
def ref_without_prefix: (String?) -> String?
|
|
761
|
-
def project_from_git_remote: () -> String?
|
|
762
961
|
def api_key: () -> String?
|
|
763
962
|
def project_path: () -> String
|
|
764
963
|
def encoded_version: () -> String
|
|
765
|
-
def blank?: (String?) -> bool
|
|
766
|
-
def git_remote_url: () -> String?
|
|
767
|
-
def git_branch_name: () -> String?
|
|
768
964
|
|
|
769
965
|
def self.project_from_git_url: (String?) -> String?
|
|
770
|
-
def self.normalize_git_url: (String?) -> String?
|
|
771
|
-
def self.project_from_uri_url: (String) -> String?
|
|
772
|
-
def self.project_from_ssh_url: (String) -> String?
|
|
773
966
|
end
|
|
774
967
|
end
|
|
775
968
|
|
|
@@ -786,21 +979,27 @@ module Henitai
|
|
|
786
979
|
attr_reader survivor_stats: Hash[Symbol, untyped]?
|
|
787
980
|
attr_reader session_id: String
|
|
788
981
|
attr_reader git_sha: String?
|
|
982
|
+
attr_reader since: String?
|
|
789
983
|
|
|
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
|
|
984
|
+
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, ?authoritative: bool, ?since: String?) -> void
|
|
791
985
|
def partial_rerun?: () -> bool
|
|
986
|
+
def authoritative?: () -> bool
|
|
792
987
|
def killed: () -> Integer
|
|
793
988
|
def survived: () -> Integer
|
|
794
989
|
def equivalent: () -> Integer
|
|
795
990
|
def detected: () -> Integer
|
|
796
991
|
def mutation_score: () -> Float?
|
|
797
992
|
def mutation_score_indicator: () -> Float?
|
|
993
|
+
def executed_scoring_summary: () -> Hash[Symbol, untyped]?
|
|
798
994
|
def scoring_summary: () -> Hash[Symbol, untyped]
|
|
799
995
|
def duration: () -> Float
|
|
800
996
|
def to_stryker_schema: () -> Hash[Symbol, untyped]
|
|
801
997
|
|
|
802
998
|
private
|
|
803
999
|
|
|
1000
|
+
def detected_in: (Array[Mutant]) -> Integer
|
|
1001
|
+
def mutation_score_for: (Array[Mutant]) -> Float?
|
|
1002
|
+
def mutation_score_indicator_for: (Array[Mutant]) -> Float?
|
|
804
1003
|
def base_schema: () -> Hash[Symbol, untyped]
|
|
805
1004
|
def unmatched_survivor_ids: () -> Array[String]
|
|
806
1005
|
def build_files_section: () -> Hash[Symbol, untyped]
|
|
@@ -810,6 +1009,9 @@ module Henitai
|
|
|
810
1009
|
def location_for: (Mutant) -> Hash[Symbol, untyped]
|
|
811
1010
|
def line_column: (Mutant, Symbol) -> Hash[Symbol, Integer]
|
|
812
1011
|
def duration_for: (Mutant) -> Integer?
|
|
1012
|
+
def status_reason_for: (Mutant) -> String?
|
|
1013
|
+
def from_cache_for: (Mutant) -> bool?
|
|
1014
|
+
def legacy_stable_id_for: (Mutant) -> String?
|
|
813
1015
|
def equivalence_uncertainty: () -> String?
|
|
814
1016
|
def stryker_status: (Symbol) -> String
|
|
815
1017
|
end
|
|
@@ -863,7 +1065,7 @@ module Henitai
|
|
|
863
1065
|
attr_reader config: Configuration
|
|
864
1066
|
attr_reader result: untyped
|
|
865
1067
|
|
|
866
|
-
def initialize: (?config: Configuration, ?subjects: Array[Subject], ?since: String, ?survivors_from: String?) -> void
|
|
1068
|
+
def initialize: (?config: Configuration, ?subjects: Array[Subject], ?since: String, ?survivors_from: String?, ?mode: Hash[Symbol, bool]) -> void
|
|
867
1069
|
def run: () -> Result
|
|
868
1070
|
def resolve_subjects: (?Array[String]) -> untyped
|
|
869
1071
|
def generate_mutants: (untyped) -> untyped
|
|
@@ -880,12 +1082,15 @@ module Henitai
|
|
|
880
1082
|
def operators: () -> untyped
|
|
881
1083
|
def progress_reporter: () -> untyped?
|
|
882
1084
|
def history_store: () -> untyped
|
|
1085
|
+
def per_test_coverage: () -> PerTestCoverage
|
|
883
1086
|
def history_store_path: () -> String
|
|
884
1087
|
def source_files: () -> Array[String]
|
|
885
1088
|
def included_source_files: () -> Array[String]
|
|
886
1089
|
def reject_excluded: (Array[String]) -> Array[String]
|
|
887
1090
|
def excluded_source_files: () -> Array[String]
|
|
888
1091
|
def filter_changed: (Array[String]) -> Array[String]
|
|
1092
|
+
def changed_paths_since: () -> Array[String]
|
|
1093
|
+
def covered_sources_for_changed_tests: (Array[String]) -> Array[String]
|
|
889
1094
|
def pattern_subjects: () -> Array[Subject]
|
|
890
1095
|
def unique_subjects: (Array[Subject]) -> Array[Subject]
|
|
891
1096
|
def normalize_path: (String) -> String
|
|
@@ -893,6 +1098,10 @@ module Henitai
|
|
|
893
1098
|
private
|
|
894
1099
|
|
|
895
1100
|
def build_result: (Array[Mutant], Time, Time) -> Result
|
|
1101
|
+
def build_result_object: (Array[Mutant], Time, Time) -> Result
|
|
1102
|
+
def pipeline_mutants: () -> Array[Mutant]
|
|
1103
|
+
def apply_incremental_filter: (Array[Mutant]) -> Array[Mutant]
|
|
1104
|
+
def dry_run_result: (Array[Mutant], Time, Time) -> Result
|
|
896
1105
|
def source_provider: () -> ^(String) -> String
|
|
897
1106
|
def persist_history: (Result, Time) -> void
|
|
898
1107
|
def bootstrap_coverage: (Array[String], ?Array[String]?) -> void
|
|
@@ -901,6 +1110,7 @@ module Henitai
|
|
|
901
1110
|
def with_reports_dir: () { () -> untyped } -> untyped
|
|
902
1111
|
def result_thresholds: () -> Hash[Symbol, Integer]?
|
|
903
1112
|
def survivor_rerun?: () -> bool
|
|
1113
|
+
def full_run?: () -> bool
|
|
904
1114
|
def survivor_strategy: () -> SurvivorRerunStrategy
|
|
905
1115
|
def safe_head_sha: () -> String?
|
|
906
1116
|
end
|
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.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Martin Otten
|
|
@@ -103,6 +103,9 @@ files:
|
|
|
103
103
|
- lib/henitai.rb
|
|
104
104
|
- lib/henitai/arid_node_filter.rb
|
|
105
105
|
- lib/henitai/available_cpu_count.rb
|
|
106
|
+
- lib/henitai/canonical_report_merger.rb
|
|
107
|
+
- lib/henitai/canonical_report_writer.rb
|
|
108
|
+
- lib/henitai/checkpoint_reporter.rb
|
|
106
109
|
- lib/henitai/cli.rb
|
|
107
110
|
- lib/henitai/cli/clean_command.rb
|
|
108
111
|
- lib/henitai/cli/command_support.rb
|
|
@@ -110,6 +113,8 @@ files:
|
|
|
110
113
|
- lib/henitai/cli/operator_command.rb
|
|
111
114
|
- lib/henitai/cli/options.rb
|
|
112
115
|
- lib/henitai/cli/run_command.rb
|
|
116
|
+
- lib/henitai/cli/run_options.rb
|
|
117
|
+
- lib/henitai/composite_progress_reporter.rb
|
|
113
118
|
- lib/henitai/configuration.rb
|
|
114
119
|
- lib/henitai/configuration_validator.rb
|
|
115
120
|
- lib/henitai/configuration_validator/rules.rb
|
|
@@ -120,14 +125,21 @@ files:
|
|
|
120
125
|
- lib/henitai/eager_load.rb
|
|
121
126
|
- lib/henitai/equivalence_detector.rb
|
|
122
127
|
- lib/henitai/execution_engine.rb
|
|
128
|
+
- lib/henitai/execution_engine/env_scope.rb
|
|
129
|
+
- lib/henitai/generated_artifacts.rb
|
|
123
130
|
- lib/henitai/git_diff_analyzer.rb
|
|
131
|
+
- lib/henitai/incremental_filter.rb
|
|
124
132
|
- lib/henitai/integration.rb
|
|
125
133
|
- lib/henitai/integration/base.rb
|
|
126
134
|
- lib/henitai/integration/child_debug_support.rb
|
|
127
135
|
- lib/henitai/integration/child_runtime_control.rb
|
|
128
136
|
- lib/henitai/integration/coverage_suppression.rb
|
|
129
137
|
- lib/henitai/integration/minitest.rb
|
|
138
|
+
- lib/henitai/integration/minitest_load_path.rb
|
|
139
|
+
- lib/henitai/integration/minitest_suite_command.rb
|
|
140
|
+
- lib/henitai/integration/minitest_test_runner.rb
|
|
130
141
|
- lib/henitai/integration/mutant_run_support.rb
|
|
142
|
+
- lib/henitai/integration/rails_environment_preloader.rb
|
|
131
143
|
- lib/henitai/integration/rspec_child_runner.rb
|
|
132
144
|
- lib/henitai/integration/rspec_process_runner.rb
|
|
133
145
|
- lib/henitai/integration/rspec_test_selection.rb
|
|
@@ -141,7 +153,9 @@ files:
|
|
|
141
153
|
- lib/henitai/mutant_generator.rb
|
|
142
154
|
- lib/henitai/mutant_history_store.rb
|
|
143
155
|
- lib/henitai/mutant_history_store/sql.rb
|
|
156
|
+
- lib/henitai/mutant_history_store/verdict_cache.rb
|
|
144
157
|
- lib/henitai/mutant_identity.rb
|
|
158
|
+
- lib/henitai/mutation_skip_directives.rb
|
|
145
159
|
- lib/henitai/operator.rb
|
|
146
160
|
- lib/henitai/operators.rb
|
|
147
161
|
- lib/henitai/operators/arithmetic_operator.rb
|
|
@@ -150,6 +164,7 @@ files:
|
|
|
150
164
|
- lib/henitai/operators/block_statement.rb
|
|
151
165
|
- lib/henitai/operators/boolean_literal.rb
|
|
152
166
|
- lib/henitai/operators/conditional_expression.rb
|
|
167
|
+
- lib/henitai/operators/equality_identity_operator.rb
|
|
153
168
|
- lib/henitai/operators/equality_operator.rb
|
|
154
169
|
- lib/henitai/operators/hash_literal.rb
|
|
155
170
|
- lib/henitai/operators/logical_operator.rb
|
|
@@ -163,13 +178,15 @@ files:
|
|
|
163
178
|
- lib/henitai/operators/string_literal.rb
|
|
164
179
|
- lib/henitai/operators/unary_operator.rb
|
|
165
180
|
- lib/henitai/operators/update_operator.rb
|
|
166
|
-
- lib/henitai/parallel_execution_runner.rb
|
|
167
181
|
- lib/henitai/parser_current.rb
|
|
182
|
+
- lib/henitai/per_test_coverage.rb
|
|
168
183
|
- lib/henitai/per_test_coverage_collector.rb
|
|
169
184
|
- lib/henitai/per_test_coverage_selector.rb
|
|
170
185
|
- lib/henitai/process_wakeup.rb
|
|
171
186
|
- lib/henitai/process_worker_runner.rb
|
|
172
187
|
- lib/henitai/reporter.rb
|
|
188
|
+
- lib/henitai/reporter/dashboard_metadata_provider.rb
|
|
189
|
+
- lib/henitai/reports_directory_lock.rb
|
|
173
190
|
- lib/henitai/result.rb
|
|
174
191
|
- lib/henitai/rspec_coverage_formatter.rb
|
|
175
192
|
- lib/henitai/runner.rb
|
|
@@ -190,7 +207,9 @@ files:
|
|
|
190
207
|
- lib/henitai/survivor_test_filter.rb
|
|
191
208
|
- lib/henitai/syntax_validator.rb
|
|
192
209
|
- lib/henitai/test_prioritizer.rb
|
|
210
|
+
- lib/henitai/timeout_calibrator.rb
|
|
193
211
|
- lib/henitai/unparse_helper.rb
|
|
212
|
+
- lib/henitai/verdict_fingerprint.rb
|
|
194
213
|
- lib/henitai/version.rb
|
|
195
214
|
- lib/henitai/warning_silencer.rb
|
|
196
215
|
- sig/configuration_validator.rbs
|
|
@@ -204,7 +223,7 @@ metadata:
|
|
|
204
223
|
changelog_uri: https://github.com/martinotten/henitai/blob/main/CHANGELOG.md
|
|
205
224
|
documentation_uri: https://github.com/martinotten/henitai/blob/main/README.md
|
|
206
225
|
homepage_uri: https://github.com/martinotten/henitai
|
|
207
|
-
source_code_uri: https://github.com/martinotten/henitai/tree/v0.
|
|
226
|
+
source_code_uri: https://github.com/martinotten/henitai/tree/v0.3.1
|
|
208
227
|
rubygems_mfa_required: 'true'
|
|
209
228
|
rdoc_options: []
|
|
210
229
|
require_paths:
|