Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a warning on non-test analysis w/o foundry_success checking #432

Merged
merged 18 commits into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.200
0.1.201
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "kontrol"
version = "0.1.200"
version = "0.1.201"
description = "Foundry integration for KEVM"
authors = [
"Runtime Verification, Inc. <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion src/kontrol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
if TYPE_CHECKING:
from typing import Final

VERSION: Final = '0.1.200'
VERSION: Final = '0.1.201'
5 changes: 5 additions & 0 deletions src/kontrol/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,11 @@ def exec_prove(
log = failure_log.print() + Foundry.help_info()
for line in log:
print(line)
_, test = proof.id.split('.')
if not any(test.startswith(prefix) for prefix in ['test', 'check', 'prove']):
print(
f'Info: {proof.id} is not prefixed with test or testFail, therefore it is not reported as failing in the presence of reverts or assertion violations.'
)

sys.exit(failed)

Expand Down
1 change: 1 addition & 0 deletions src/kontrol/prove.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ def init_and_run_proof(test: FoundryTest) -> APRFailureInfo | Exception | None:
end_time = time.time()
proof.add_exec_time(end_time - start_time)
proof.write_proof_data()

# Only return the failure info to avoid pickling the whole proof
if proof.failure_info is not None and not isinstance(proof.failure_info, APRFailureInfo):
raise RuntimeError('Generated failure info for APRProof is not APRFailureInfo.')
Expand Down
Loading