Skip to content

refactor[test]: add more tests with hevm venom harness#4493

Merged
charles-cooper merged 70 commits intovyperlang:masterfrom
HodanPlodky:chore/venom/test-update
Mar 8, 2025
Merged

refactor[test]: add more tests with hevm venom harness#4493
charles-cooper merged 70 commits intovyperlang:masterfrom
HodanPlodky:chore/venom/test-update

Conversation

@HodanPlodky
Copy link
Copy Markdown
Collaborator

@HodanPlodky HodanPlodky commented Feb 24, 2025

What I did

Added hevm harness to more venom tests

How I did it

rewrote tests to venom text format if needed and used hevm harness

How to verify it

Commit message

add the hevm harness to more venom tests. refactor tests as needed to
use new text-format machinery. add a `PrePostChecker` machinery, which
abstracts common harness construction across venom tests. expand some
tests/test cases as appropriate

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.04%. Comparing base (072b386) to head (d5ff8c3).
Report is 94 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4493   +/-   ##
=======================================
  Coverage   92.04%   92.04%           
=======================================
  Files         120      120           
  Lines       17361    17361           
  Branches     2940     2940           
=======================================
  Hits        15980    15980           
  Misses        964      964           
  Partials      417      417           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@charles-cooper charles-cooper changed the title chore:[venom]more tests with hevm venom harness refactor[test]: add more tests with hevm venom harness Feb 24, 2025
self.pass_objects = list()

def __call__(self, pre: str, post: str, hevm: bool | None = None) -> list[IRPass]:
from tests.hevm import hevm_check_venom

Check notice

Code scanning / CodeQL

Cyclic import Note test

Import of module
tests.hevm
begins an import cycle.
pass_objects: list[IRPass]
default_hevm: bool

def __init__(self, *passes, post: list[type] | None = None, default_hevm: bool = True):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bit odd that pre passes are passed as varargs but post passes are passed as a list

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did this like that because in most cases there are only pre passes and post are added as something that is only occasionally added. But if you would think that it should be same then for sure I could switch it.

jmp @join
join:
%3 = phi @then, %1, @else, %2
stop
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should sink %3 here, otherwise hevm will trivially validate it

@charles-cooper charles-cooper enabled auto-merge (squash) March 8, 2025 13:21
@charles-cooper charles-cooper disabled auto-merge March 8, 2025 13:22
@charles-cooper charles-cooper enabled auto-merge (squash) March 8, 2025 13:22
@charles-cooper charles-cooper merged commit d395dd0 into vyperlang:master Mar 8, 2025
159 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants