Add predicate script for wasm-tools shrink
and similar reduction tools.
This commit is contained in:
parent
4b40e52c28
commit
9730254c41
20
scripts/reduce-predicate.sh
Executable file
20
scripts/reduce-predicate.sh
Executable file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
timeout 1 wasmtime run --disable-cache $1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo bad: initial run crashes too
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
target/release/waffle-util roundtrip -i $1 -o o.wasm
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo bad: roundtrip
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
wasmtime run --disable-cache o.wasm
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo ok: still crashes
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo bad: no longer crashes
|
||||||
|
exit 1
|
||||||
|
fi
|
Loading…
Reference in a new issue