winch: Adding support for integration tests (#5588)

* Adding in the foundations for Winch `filetests`

This commit adds two new crates into the Winch workspace:
`filetests` and `test-macros`. The intent is to mimic the
structure of Cranelift `filetests`, but in a simpler way.

* Updates to documentation

This commits adds a high level document to outline how to test Winch
through the `winch-tools` utility. It also updates some inline
documentation which gets propagated to the CLI.

* Updating test-macro to use a glob instead of only a flat directory
This commit is contained in:
Kevin Rizzo
2023-01-19 07:34:48 -05:00
committed by GitHub
parent 7cea73a81d
commit da03ff47f1
16 changed files with 586 additions and 135 deletions

36
Cargo.lock generated
View File

@@ -766,9 +766,12 @@ dependencies = [
"log",
"pretty_env_logger",
"rayon",
"serde",
"similar",
"target-lexicon",
"termcolor",
"thiserror",
"toml",
"walkdir",
"wat",
]
@@ -3949,6 +3952,33 @@ dependencies = [
"wasmparser",
]
[[package]]
name = "winch-filetests"
version = "0.0.0"
dependencies = [
"anyhow",
"capstone",
"cranelift-codegen",
"serde",
"similar",
"target-lexicon",
"toml",
"wasmtime-environ",
"wat",
"winch-codegen",
"winch-test-macros",
]
[[package]]
name = "winch-test-macros"
version = "0.0.0"
dependencies = [
"glob",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "winch-tools"
version = "0.0.0"
@@ -3957,11 +3987,17 @@ dependencies = [
"capstone",
"clap 3.2.8",
"cranelift-codegen",
"glob",
"serde",
"similar",
"target-lexicon",
"toml",
"wasmparser",
"wasmtime-environ",
"wat",
"winch-codegen",
"winch-filetests",
"winch-test-macros",
]
[[package]]