Skip to content

Commit

Permalink
Refactor test-programs to build modules and components (bytecodeallia…
Browse files Browse the repository at this point in the history
…nce#6385)

* wasi-tests and wasi-http-tests no longer have their own workspace

* wasi-tests: fix warnings

* rewrite the test-programs build.rs to generate {package}_modules.rs and _components.rs

The style is cribbed from preview2-prototying repo, but I ended up
refactoring it a bit.

* better escaping should help with windows?

* long form cap-std-sync and tokio test suites

* convert wasi-http test

* fixes, comments

* apply cargo fmt to whole workspace

* bump test-programs and wasi-http-tests to all use common dependency versions

wit-bindgen 0.6.0 and wit-component 0.7.4

* add new audits

* cargo vet prune

* package and supply chain updates to fix vulnerabilities

h2 upgraded from 0.3.16 -> 0.3.19 to fix vulnerability
tempfile upgraded from 0.3.3 -> 0.3.5 to eliminate dep on vulnerable
remove_dir_all

* deny: temporarily allow duplicate wasm-encoder, wasmparser, wit-parser

prtest:full

* convert more dependencies to { workspace = true }

Alex asked me to do thsi for wit-component and wit-bindgen, and I found
a few more (cfg-if, tempfile, filecheck, anyhow...

I also reorganized the workspace dependencies section to make the ones
our team maintains more clearly separated from our external
dependencies.

* test-programs build: ensure that the user writes a #[test] for each module, component

* fix build of wasi-tests on windows

* misspelled macos

* mark wasi-tests crate test=false so we dont try building it natively...

* mark wasi-http-tests test=false as well

* try getting the cargo keys right

* just exclude wasi-tests and wasi-http-tests in run-tests.sh

* interesting paths fails on windows

* misspelling so nice i did it twice

* new cargo deny exception: ignore all of wit-bindgen's dependencies

* auto-import wildcard vets
  • Loading branch information
Pat Hickey authored May 17, 2023
1 parent fe99d46 commit 338b535
Show file tree
Hide file tree
Showing 37 changed files with 1,080 additions and 1,187 deletions.
141 changes: 103 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 28 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ rustix = { workspace = true, features = ["mm", "param"] }
wasmtime = { workspace = true, features = ['component-model', 'async', 'default', 'winch'] }
env_logger = { workspace = true }
log = { workspace = true }
filecheck = "0.5.0"
tempfile = "3.1.0"
filecheck = { workspace = true }
tempfile = { workspace = true }
test-programs = { path = "crates/test-programs" }
wasmtime-runtime = { workspace = true }
tokio = { version = "1.8.0", features = ["rt", "time", "macros", "rt-multi-thread"] }
Expand Down Expand Up @@ -97,6 +97,8 @@ members = [
"crates/cli-flags",
"crates/environ/fuzz",
"crates/jit-icache-coherence",
"crates/test-programs/wasi-tests",
"crates/test-programs/wasi-http-tests",
"crates/wasi-preview1-component-adapter",
"crates/wasi-preview1-component-adapter/verify",
"crates/winch",
Expand Down Expand Up @@ -179,8 +181,21 @@ winch-test-macros = { path = "winch/test-macros" }
wasi-preview1-component-adapter = { path = "crates/wasi-preview1-component-adapter" }
byte-array-literals = { path = "crates/wasi-preview1-component-adapter/byte-array-literals" }

# Bytecode Alliance maintained dependencies:
# ---------------------------
regalloc2 = "0.8.1"

# cap-std family:
target-lexicon = { version = "0.12.3", default-features = false, features = ["std"] }
anyhow = "1.0.22"
cap-std = "1.0.0"
cap-rand = "1.0.0"
io-lifetimes = { version = "1.0.0", default-features = false }
rustix = "0.37.13"

# wit-bindgen:
wit-bindgen = "0.6.0"

# wasm-tools family:
wasmparser = "0.105.0"
wat = "1.0.64"
wast = "58.0.0"
Expand All @@ -189,20 +204,21 @@ wasm-encoder = "0.27.0"
wasm-smith = "0.12.8"
wasm-mutate = "0.2.25"
wit-parser = "0.7.1"
wit-component = "0.9.0"

# Non-Bytecode Alliance maintained dependencies:
# --------------------------
object = { version = "0.30.3", default-features = false, features = ['read_core', 'elf', 'std'] }
gimli = { version = "0.27.0", default-features = false, features = ['read', 'std'] }
anyhow = "1.0.22"
windows-sys = "0.48.0"
env_logger = "0.10"
rustix = "0.37.13"
log = { version = "0.4.8", default-features = false }
object = { version = "0.30.3", default-features = false, features = ['read_core', 'elf', 'std'] }
gimli = { version = "0.27.0", default-features = false, features = ['read', 'std'] }
clap = { version = "3.2.0", features = ["color", "suggestions", "derive"] }
hashbrown = "0.13.2"
cap-std = "1.0.0"
cap-rand = "1.0.0"
capstone = "0.9.0"
once_cell = "1.12.0"
smallvec = { version = "1.6.1", features = ["union"] }
io-lifetimes = { version = "1.0.0", default-features = false }
tracing = "0.1.26"
bitflags = "1.2"
thiserror = "1.0.15"
Expand All @@ -214,8 +230,10 @@ serde = "1.0.94"
serde_json = "1.0.80"
glob = "0.3.0"
libfuzzer-sys = "0.4.0"
regalloc2 = "0.8.1"
walkdir = "2.3.3"
cfg-if = "1.0"
tempfile = "3.1.0"
filecheck = "0.5.0"

[features]
default = [
Expand Down
Loading

0 comments on commit 338b535

Please sign in to comment.