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

bug(pytest, forks): fix yul_test marker and improve solc --evm-version param handling #418

Conversation

danceratopz
Copy link
Member

@danceratopz danceratopz commented Jan 30, 2024

🗒️ Description

  1. Fixes fill -m yul_test which failed to filter tests that were (dynamically) marked as a yul test.
  2. Defines which forks our supported solc versions can use as an argument to --evm-version.
  3. Uses the definition from 2. to better pick an argument to --evm-version if the current fork is not supported.
  4. Exit fill early in case of raising an incompatible solc. Previously this would return an error for every collected test:
    ✦ ➜ fill tests --solc-bin ~/bin/solc-0.8.19
    Exit: Unsupported solc version: 0.8.19+commit.7dd6d404.Linux.gpp. Minimum required version is 0.8.20
    

Opened as draft, remaining to do:

  • Add tests for new ethereum_test_forks.helpers.

Won't add pytest framework tests for pytest_plugins.test_filler. Would be nice, but we currently don't currently manage available solc versions, so results are undefined.

🔗 Related Issues

None.

✅ Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • Tests: Included the type and version of evm t8n tool used to locally execute test cases: e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

@danceratopz danceratopz added type:bug Something isn't working scope:forks Scope: ethereum_test_forks package scope:pytest Scope: Pytest plugins labels Jan 30, 2024
Copy link
Member Author

@danceratopz danceratopz left a comment

Choose a reason for hiding this comment

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

Just a few comments.

src/ethereum_test_forks/base_fork.py Outdated Show resolved Hide resolved
src/ethereum_test_forks/forks/forks.py Outdated Show resolved Hide resolved
src/ethereum_test_forks/base_fork.py Outdated Show resolved Hide resolved
src/pytest_plugins/test_filler/test_filler.py Show resolved Hide resolved
src/pytest_plugins/test_filler/test_filler.py Show resolved Hide resolved
src/pytest_plugins/test_filler/test_filler.py Show resolved Hide resolved
@danceratopz danceratopz marked this pull request as ready for review January 31, 2024 12:29
@danceratopz danceratopz requested review from marioevz and removed request for marioevz and spencer-tb January 31, 2024 15:36
Copy link
Collaborator

@spencer-tb spencer-tb left a comment

Choose a reason for hiding this comment

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

LGTM! I really like the approach with solc_min_version()

src/ethereum_test_forks/base_fork.py Outdated Show resolved Hide resolved
docs/CHANGELOG.md Outdated Show resolved Hide resolved
@spencer-tb spencer-tb changed the title fix (pytest, forks): fix yul_test marker and improve solc --evm-version param handling bug(pytest, forks): fix yul_test marker and improve solc --evm-version param handling Feb 1, 2024
@danceratopz danceratopz merged commit 3ec3fa3 into ethereum:main Feb 1, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:forks Scope: ethereum_test_forks package scope:pytest Scope: Pytest plugins type:bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants