-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 the #[wasmtime_test]
macro
#9627
Refactor the #[wasmtime_test]
macro
#9627
Conversation
* Start tests with a blank slate of features instead of with the default set of features enables (ensures each test explicitly specifies required features) * Reuse test features from `wasmtime_wast_util` to avoid duplicating listings of features. Also shares logic for "should this compiler fail this test because of unsupported features". * Move logic in `tests/wast.rs` to apply test configuration to a `Config` to a new location that can be shared across suites. * Add a new feature for `simd` and flag tests that need it with the feature. This is done in preparation for adding a new compiler strategy of Pulley to be able to flag tests as passing for pulley or not.
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 improvement looks good!
crates/test-macros/src/lib.rs
Outdated
} | ||
}); | ||
let ignore = if strategy.should_fail(&test_config.flags) { | ||
quote!(#[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.
Maybe this should be #[should_panic]
? I get that this keeps the original behavior but more just wondering: if we check for panics and then it stops panicking then we know more quickly which Winch tests can be 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.
Good point! Works well 👍
Subscribe to Label Actioncc @fitzgen
This issue or pull request has been labeled: "fuzzing"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
Start tests with a blank slate of features instead of with the default set of features enables (ensures each test explicitly specifies required features)
Reuse test features from
wasmtime_wast_util
to avoid duplicating listings of features. Also shares logic for "should this compiler fail this test because of unsupported features".Move logic in
tests/wast.rs
to apply test configuration to aConfig
to a new location that can be shared across suites.Add a new feature for
simd
and flag tests that need it with the feature.This is done in preparation for adding a new compiler strategy of Pulley to be able to flag tests as passing for pulley or not.