-
-
Notifications
You must be signed in to change notification settings - Fork 849
feat[tool]: export test suite to json #4638
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
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4638 +/- ##
=======================================
Coverage 92.99% 93.00%
=======================================
Files 131 131
Lines 19094 19094
Branches 3324 3324
=======================================
+ Hits 17757 17758 +1
Misses 899 899
+ Partials 438 437 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tests/exports.py
Outdated
key = (bucket, base) | ||
|
||
if will_execute: | ||
cnt = self._counts.get(key, 0) + 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
count
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed in: 3c98f37
@@ -221,8 +249,13 @@ def ir_compiler(ir, *args, **kwargs): | |||
assembly = compile_ir.compile_to_assembly(ir, optimize=optimize) | |||
bytecode, _ = compile_ir.assembly_to_evm(assembly) | |||
|
|||
export_metadata = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to bother exporting contracts compiled directly from IR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, because they are in the environment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah exactly, it has side-effects. we could also drop the tests that use these functions from the exports but this is a more general approach and it's easy to filter at client side
tests/conftest.py
Outdated
|
||
# if cache is empty it means the fixture will execute | ||
will_execute = fixturedef.cached_result is None | ||
suc = exporter.set_item(fixturedef, will_execute) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does suc stand for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed in: 3c98f37
@@ -166,10 +274,61 @@ def message_call( | |||
gas: int | None = None, | |||
gas_price: int = 0, | |||
is_modifying: bool = True, | |||
) -> bytes: | |||
blob_hashes: Optional[list[bytes]] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we ever actually pass blob_hashes to message_call?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think i was just following the api: https://github.com/vyperlang/vyper/pull/4638/files#diff-e30593594454fdaf6d9a0e009c31c3c494f08587ce3fa1e2fb7c5c41b5c06275L104
tests/exports.py
Outdated
out.parent.mkdir(parents=True, exist_ok=True) | ||
|
||
by_name = { | ||
ti.name: {"deps": ti.deps, "traces": ti.traces, "item_type": ti.item_type} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is ti
an abbreviation for item
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's traced_item
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed in: 3c98f37
since we merged #4707, it will probably be neccessary to store also the override inside the deployment trace |
What I did
How I did it
How to verify it
Commit message
Commit message for the final, squashed PR. (Optional, but reviewers will appreciate it! Please see our commit message style guide for what we would ideally like to see in a commit message.)
Description for the changelog
Cute Animal Picture