Skip to content

Commit 448018a

Browse files
committed
perf(test): remove redundant integration test executions
Remove LLVM backend parametrization from test_exec_smir (keep Haskell only) and remove test_prove_termination entirely. This eliminates ~54 redundant test executions: - exec_smir previously ran every test twice (LLVM + Haskell). Since Haskell is the backend used for proving, keeping it catches the more impactful bugs. - prove_termination tested the same 19 programs already covered by exec_smir[haskell], using the same Haskell backend. Expected CI time reduction: ~2h37m → ~1h20m. Resolves #971 (Phase 1)
1 parent 7258cfb commit 448018a

1 file changed

Lines changed: 1 addition & 17 deletions

File tree

kmir/src/tests/integration/test_integration.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -377,40 +377,24 @@ def test_crate_examples(main_crate: Path, kmir: KMIR, update_expected_output: bo
377377
]
378378

379379

380-
@pytest.mark.parametrize('symbolic', [False, True], ids=['llvm', 'haskell'])
381380
@pytest.mark.parametrize(
382381
'test_case',
383382
EXEC_DATA,
384383
ids=[name for (name, _, _, _) in EXEC_DATA],
385384
)
386385
def test_exec_smir(
387386
test_case: tuple[str, Path, Path, int],
388-
symbolic: bool,
389387
update_expected_output: bool,
390388
tmp_path: Path,
391389
) -> None:
392390
_, input_json, output_kast, depth = test_case
393391
smir_info = SMIRInfo.from_file(input_json)
394-
kmir_backend = KMIR.from_kompiled_kore(smir_info, target_dir=tmp_path, symbolic=symbolic)
392+
kmir_backend = KMIR.from_kompiled_kore(smir_info, target_dir=tmp_path, symbolic=True)
395393
result = kmir_backend.run_smir(smir_info, depth=depth)
396394
result_pretty = kmir_backend.kore_to_pretty(result).rstrip()
397395
assert_or_update_show_output(result_pretty, output_kast, update=update_expected_output)
398396

399397

400-
@pytest.mark.parametrize(
401-
'test_data',
402-
[(name, smir_json) for (name, smir_json, _, depth) in EXEC_DATA if depth is None],
403-
ids=[name for (name, _, _, depth) in EXEC_DATA if depth is None],
404-
)
405-
def test_prove_termination(test_data: tuple[str, Path], tmp_path: Path, kmir: KMIR) -> None:
406-
testname, smir_json = test_data
407-
408-
prove_rs_opts = ProveRSOpts(rs_file=smir_json, smir=True)
409-
410-
proof = KMIR.prove_rs(prove_rs_opts)
411-
assert proof.passed
412-
413-
414398
SCHEMA_PARSE_DATA = (Path(__file__).parent / 'data' / 'schema-parse').resolve(strict=True)
415399
SCHEMA_PARSE_INPUT_DIRS = [
416400
SCHEMA_PARSE_DATA / 'local',

0 commit comments

Comments
 (0)