[fuzzing] Only use docker image on x86_64 machines

The echidna docker image does not support ARM
Macs, for example.
This commit is contained in:
Mark Spanbroek 2023-06-19 11:36:21 +02:00 committed by markspanbroek
parent b396f13359
commit f530bc5081
1 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,7 @@
set -e set -e
root=$(cd $(dirname "$0")/.. && pwd) root=$(cd $(dirname "$0")/.. && pwd)
arch=$(arch)
if command -v echidna; then if command -v echidna; then
fuzz () { fuzz () {
@ -11,7 +12,7 @@ if command -v echidna; then
--crytic-args --ignore-compile \ --crytic-args --ignore-compile \
--contract $1 --contract $1
} }
else elif [ "${arch}" = "x86_64" ]; then
fuzz () { fuzz () {
docker run \ docker run \
--rm \ --rm \
@ -23,6 +24,10 @@ else
--crytic-args --ignore-compile \ --crytic-args --ignore-compile \
--contract $1" --contract $1"
} }
else
echo "Error: echidna not found, and the docker image does not support ${arch}"
echo "Please install echidna: https://github.com/crytic/echidna#installation"
exit 1
fi fi
fuzz FuzzMarketplace fuzz FuzzMarketplace