mirror of
https://github.com/elder-plinius/OBLITERATUS.git
synced 2026-08-17 16:37:30 +02:00
ci: preload native modules for mutmut
This commit is contained in:
@@ -421,7 +421,9 @@ jobs:
|
||||
run: |
|
||||
/usr/bin/time -f 'elapsed_seconds=%e\nmax_rss_kb=%M' \
|
||||
-o quality-evidence/mutation-time.txt \
|
||||
"$QUALITY_ENV/bin/mutmut" run --max-children 4
|
||||
"$QUALITY_ENV/bin/python" -c \
|
||||
'import torch, yaml; from mutmut.__main__ import cli; cli()' \
|
||||
run --max-children 4
|
||||
"$QUALITY_ENV/bin/mutmut" results > quality-evidence/mutation-survivors.txt
|
||||
"$QUALITY_ENV/bin/mutmut" export-cicd-stats
|
||||
cp mutants/mutmut-cicd-stats.json quality-evidence/mutation-stats.json
|
||||
|
||||
+1
-3
@@ -127,9 +127,7 @@ pytest_add_cli_args_test_selection = [
|
||||
"tests/test_coverage_thresholds.py",
|
||||
"tests/test_numerical_contracts.py",
|
||||
]
|
||||
# Mutating the complete bounded target set is both stronger and avoids mutmut's
|
||||
# in-process native-extension unload/reload crash during covered-line discovery.
|
||||
mutate_only_covered_lines = false
|
||||
mutate_only_covered_lines = true
|
||||
on_dependency_change = "rerun"
|
||||
|
||||
[tool.uv]
|
||||
|
||||
@@ -9,13 +9,15 @@ from pathlib import Path
|
||||
from scripts import check_quality_policy as quality
|
||||
|
||||
|
||||
def test_mutation_campaign_avoids_native_extension_reload_mode():
|
||||
def test_mutation_campaign_preloads_native_modules_before_covered_line_discovery():
|
||||
pyproject = Path("pyproject.toml").read_text()
|
||||
mutmut_config = pyproject.split("[tool.mutmut]", maxsplit=1)[1].split(
|
||||
"\n[", maxsplit=1,
|
||||
)[0]
|
||||
workflow = Path(".github/workflows/ci.yml").read_text()
|
||||
|
||||
assert "mutate_only_covered_lines = false" in mutmut_config
|
||||
assert "mutate_only_covered_lines = true" in mutmut_config
|
||||
assert "import torch, yaml; from mutmut.__main__ import cli; cli()" in workflow
|
||||
|
||||
|
||||
def _policy():
|
||||
|
||||
Reference in New Issue
Block a user