Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/ci/miri-provenance-test.sh
1685 views
1
#!/bin/bash
2
3
# This is a small script to assist in running the `pulley_provenance_test` test
4
# located at `tests/all/pulley.rs`. The goal of this script is to use the native
5
# host to compile the wasm module in question to avoid needing to run Cranelift
6
# under MIRI. That enables much faster iteration on the test here.
7
8
set -ex
9
10
compile() {
11
cargo run --no-default-features --features compile,pulley,wat,gc-drc,component-model,component-model-async \
12
compile --target pulley64 $1 \
13
-o ${1%.wat}.cwasm \
14
-O memory-reservation=$((1 << 20)) \
15
-O memory-guard-size=0 \
16
-O signals-based-traps=n \
17
-W function-references,component-model-async,component-model-async-stackful,component-model-async-builtins,component-model-error-context
18
}
19
20
compile ./tests/all/pulley_provenance_test.wat
21
compile ./tests/all/pulley_provenance_test_component.wat
22
compile ./tests/all/pulley_provenance_test_async_component.wat
23
24
MIRIFLAGS="$MIRIFLAGS -Zmiri-disable-isolation -Zmiri-permissive-provenance" \
25
cargo miri test --test all -- \
26
--ignored pulley_provenance_test "$@"
27
28