-
Notifications
You must be signed in to change notification settings - Fork 182
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
test runner #807
test runner #807
Conversation
2286ff0
to
a76549b
Compare
9e2de17
to
1805c0e
Compare
8fa5d45
to
4e94b58
Compare
55df6d3
to
7e3d540
Compare
6881993
to
8f37628
Compare
6bc5914
to
3da04d7
Compare
21bf81f
to
c4e9579
Compare
I'm using revm now @sbillig. There's a nested dependency on |
crates/analyzer/tests/errors.rs
Outdated
// test_file! { test_call } | ||
// test_file! { test_params } |
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.
@g-r-a-n-t These tests aren't producing snapshots, which breaks the test on wasm. I assume there's no error output? (The test_file
macro should probably assert that there's error output)
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.
for some reason test_
is being removed from the snapshot name when using insta
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, looks like insta just does this
#[test]
fn test_my_thing() {
assert_snapshot!("test123")
}
Snapshot file: crates/analyzer/tests/snapshots/errors__my_thing.snap
Snapshot: my_thing
Source: crates/analyzer/tests/errors.rs:101
2b33047
to
46e22a1
Compare
- name: Run WASM tests | ||
# wasm-pack needs a Cargo.toml with a 'package' field. | ||
# (see https://github.com/rustwasm/wasm-pack/issues/642) | ||
# This will still run all tests in the workspace. | ||
run: wasm-pack test --node crates/fe -- --workspace |
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'm pretty sure this used to run the tests, but now doesn't, so we haven't actually been running wasm tests for a while (and they've been broken). I guess it was a wasm-pack change? 🤷
@g-r-a-n-t I pushed a commit to let the test-runner crate build on wasm, but of course we can't run any of the tests because we can't build the solc backend on wasm 🤦. Anyway, I still think this was a worthwhile exercise. |
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.
Looks good
This PR contains the following:
test
attribute for functions and appropriate checkstest-runner
crate with revm backendtests
crate which uses the test runner (renamed old tests crate totests-legacy
)test
subcommandExample CLI usage:
To-Do