Skip to content

fix(consume): allow absolute paths for --evm-bin #1052

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

Merged
merged 3 commits into from
Jan 7, 2025

Conversation

danceratopz
Copy link
Member

🗒️ Description

If the value passed to --evm-bin resolved to an absolute path (e.g., ~/bin/evm) the value passed to the flag was ignored by pytest (see error message below). This workaround, which re-orders the args provided to pytest, avoids the problem.

Example Failure

uv run consume direct --evm-bin /home/dtopz/bin/evm

results in the error:

UsageError: usage: consume [options] [file_or_dir] [file_or_dir] [...]
consume: error: unrecognized arguments: --evm-bin src/pytest_plugins/consume/direct/test_via_direct.py

Note: Specifying the value via = works (uv run consume direct --evm-bin=/home/dtopz/bin/evm).

🔗 Related Issues

Reported in #1018 (comment).

✅ Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.

If the value passed to --evm-bin was an abolute path, it got ignored by pytest. Perhaps, it got interpreted as a test paths? This workaround avoids the problem.
The default value of the TransitionTool (`ethereum-spec-evm-resolver`) doesn't support state- or blocktest consumption; use the Geth `evm` binary in PATH as the default value.
@danceratopz danceratopz added type:bug Something isn't working scope:consume Scope: Consume command suite labels Jan 7, 2025
@danceratopz danceratopz self-assigned this Jan 7, 2025
@danceratopz danceratopz force-pushed the fix/consume/evm-bin-with-absolute-path branch from 99f2d19 to ba7bd9f Compare January 7, 2025 10:14
Copy link
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

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

Thanks!

@marioevz marioevz merged commit a4adea6 into main Jan 7, 2025
5 checks passed
@marioevz marioevz deleted the fix/consume/evm-bin-with-absolute-path branch January 7, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:consume Scope: Consume command suite type:bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants