-
Notifications
You must be signed in to change notification settings - Fork 374
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
update tests to use cargo-nextest if present #1243
Conversation
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.
Please add a PR summary of why the PR has been made, what it addresses, etc.
Of course, I googled what this is, read about it, and assume you want to speed up the execution. Still, a summary of this info should be available as part of the PR.
Makefile
Outdated
|
||
.PHONY: test | ||
test: | ||
SKIP_WASM_BUILD= ${cargo_test} --all |
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 we want to skip --all
since it disables some part of the code (even though I think they're not tested by UTs) that are run outside of evm-tracing
context. This is why we specified try-runtime,runtime-benchmarks
explicitly before.
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.
actually --all
is deprecated and needs to be replaced with --workspace
. I don't understand it disables some part of the 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.
Some parts of the client code are compiled only when evm-tracing
is disabled, and vice-versa. That's what I meant by disabled - poor choice of words from my side.
Since non-evm-tracing client is more important, running tests with disabled evm-tracing
makes more sense. But then again, I don't believe we have tests covering client so perhaps this worry is baseless.
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.
We don't run any test with feature evm-tracing
. Will add one
Makefile
Outdated
.PHONY: test-all | ||
test-all: test test-runtimes | ||
SKIP_WASM_BUILD= ${cargo_test} --workspace --features try-runtime,runtime-benchmarks |
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.
To make my comment more specific about features...
Why not just run it once with features enabled?
I assume this is because you want to ensure that tests work with no features enabled?
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
bin/collator/src/local/chain_spec.rs
Outdated
@@ -194,6 +194,7 @@ pub(crate) mod tests { | |||
use sp_runtime::BuildStorage; | |||
|
|||
#[test] | |||
#[ignore] |
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.
Why this btw? 🙂
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.
this will require building wasm which means more time to compile and it's just for local so not that critical if this breaks
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.
ok I will let it compile local runtime, will revert 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.
No need btw, we can just remove that test. But your call.
Minimum allowed line rate 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.
LGTM
Make
cargo-nextest
preferred option to run tests with fallback tocargo test
.cargo-nextest
makes it easy to identify slow and leaky test and tests results are easy to read.