-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move most wasmtime tests into one test suite (#1544)
* Move most wasmtime tests into one test suite This commit moves most wasmtime tests into a single test suite which gets compiled into one executable instead of having lots of test executables. The goal here is to reduce disk space on CI, and this should be achieved by having fewer executables which means fewer copies of `libwasmtime.rlib` linked across binaries on the system. More importantly though this means that DWARF debug information should only be in one executable rather than duplicated across many. * Share more build caches Globally set `RUSTFLAGS` to `-Dwarnings` instead of individually so all build steps share the same value. * Allow some dead code in cranelift-codegen Prevents having to fix all warnings for all possible feature combinations, only the main ones which come up. * Update some debug file paths
- Loading branch information
1 parent
a524f58
commit 4c82da4
Showing
39 changed files
with
48 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
//! Regression tests for bugs found via fuzzing. | ||
//! | ||
//! The `#[test]` goes in here, the Wasm binary goes in | ||
//! `./regressions/some-descriptive-name.wasm`, and then the `#[test]` should | ||
//! `./fuzzing/some-descriptive-name.wasm`, and then the `#[test]` should | ||
//! use the Wasm binary by including it via | ||
//! `include_bytes!("./regressions/some-descriptive-name.wasm")`. | ||
//! `include_bytes!("./fuzzing/some-descriptive-name.wasm")`. | ||
use wasmtime::{Config, Strategy}; | ||
use wasmtime_fuzzing::oracles; | ||
|
||
#[test] | ||
fn instantiate_empty_module() { | ||
let data = wat::parse_str(include_str!("./regressions/empty.wat")).unwrap(); | ||
let data = wat::parse_str(include_str!("./fuzzing/empty.wat")).unwrap(); | ||
oracles::instantiate(&data, Strategy::Auto); | ||
} | ||
|
||
#[test] | ||
fn instantiate_empty_module_with_memory() { | ||
let data = wat::parse_str(include_str!("./regressions/empty_with_memory.wat")).unwrap(); | ||
let data = wat::parse_str(include_str!("./fuzzing/empty_with_memory.wat")).unwrap(); | ||
oracles::instantiate(&data, Strategy::Auto); | ||
} | ||
|
||
#[test] | ||
fn instantiate_module_that_compiled_to_x64_has_register_32() { | ||
let mut config = Config::new(); | ||
config.debug_info(true); | ||
let data = wat::parse_str(include_str!("./regressions/issue694.wat")).unwrap(); | ||
let data = wat::parse_str(include_str!("./fuzzing/issue694.wat")).unwrap(); | ||
oracles::instantiate_with_config(&data, config); | ||
} |
2 changes: 1 addition & 1 deletion
2
crates/fuzzing/tests/regressions/README.md → tests/all/fuzzing/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
This directory contains `.wasm` binaries generated during fuzzing that uncovered | ||
a bug, and which we now use as regression tests in `../regressions.rs`. | ||
a bug, and which we now use as regression tests in `../fuzzing.rs`. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
mod cli_tests; | ||
mod custom_signal_handler; | ||
mod debug; | ||
mod externals; | ||
mod func; | ||
mod fuzzing; | ||
mod globals; | ||
mod import_calling_export; | ||
mod import_indexes; | ||
mod instance; | ||
mod invoke_func_via_table; | ||
mod linker; | ||
mod memory_creator; | ||
mod name; | ||
mod traps; | ||
mod wast; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.