-
Notifications
You must be signed in to change notification settings - Fork 50
ci(l1): enable blockchain ef tests to be run with levm #2440
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
ci(l1): enable blockchain ef tests to be run with levm #2440
Conversation
Lines of code reportTotal lines added: Detailed view
|
// Discard this test | ||
continue; | ||
} | ||
#[allow(dead_code)] |
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.
instead of allow dead code, you can do #[cfg(not(feature = "levm"))]
right?
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.
Yes, that's an alternative, but since the feature flags usually don't go well with LSPs, I tried to use them just on the harness.
I can make the change if you want, just let me know!
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'd prefer to use actual feature flags, I haven't had any problems with LSP. But if you feel strongly about this you can leave it as is.
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.
The risk of allowing dead code is that it might become actual dead code add some point. And the fact that it is not clear why it was set as dead code.
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 agree with using the feature flag
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.
No problem! I'll change it, I'm not strongly about this.
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.
Done!
} | ||
} | ||
|
||
pub fn parse_and_execute_with_filter(path: &Path, evm: EvmEngine, skipped_tests: &[&str]) { |
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.
nit: instead of having two functions, I would just have parse_and_execute
, with an optional third argument.
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 went for this option because it's easier to see in the logs which VM is being executed
Yep, it's a good idea
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.
some nits but lgtm
// Discard this test | ||
continue; | ||
} | ||
#[allow(dead_code)] |
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 agree with using the feature flag
Motivation
We want to run the Ethereum Foundation blockchain tests with LEVM. Currently, we are only running them with REVM.
Description
This PR modifies the EF tests runner so it executes the EF tests with both VMs. The implementation combines both executions on the same command
cargo test
, but could be easily modified to include a feature flag to separate both executions if that's desired.