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

refactor(fw): re-write gas test generator as pytest plugin #760

Draft
wants to merge 3 commits into
base: gas-test-generator
Choose a base branch
from

Conversation

danceratopz
Copy link
Member

@danceratopz danceratopz commented Aug 23, 2024

🗒️ Description

Rewrites #719 as a pytest plugin; cf comments in #719 (review).

Still a WIP, to do:

  • Handle data fixture.
  • Refactor test_mcopy_huge_memory_expansion to use plugin
  • oog fails.
  • check plugin doesn't affect tests not marked with @ptyest.mark.generate_gas_test
  • add testing
  • clean-up how the data fixture is handled in the plugin;
  • nice error message if data fixture is not available and with_data keyword is used. and vice versa?).
  • nice error message if exact_gas_cost fixture is not available (cc @spencer-tb)

Fixtures seem to match, although test ids differ.

I've been executing fill as:

fill --fork=Cancun tests/cancun/eip5656_mcopy/test_mcopy_memory_expansion.py -m state_test -v -x --output=fixtures-after -s

🔗 Related Issues

#719

✅ 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: All converted JSON/YML tests from ethereum/tests have been added to converted-ethereum-tests.txt.
  • Tests: A PR with removal of converted JSON/YML tests from ethereum/tests have been opened.
  • 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 mentioned this pull request Aug 23, 2024
8 tasks
@danceratopz danceratopz changed the title refactor(fw) re-write gas test generator as pytest plugin refactor(fw): re-write gas test generator as pytest plugin Aug 23, 2024
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.

1 participant