From f530bc50815efce24c60d4531b65314d88a704fb Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Mon, 19 Jun 2023 11:36:21 +0200 Subject: [PATCH] [fuzzing] Only use docker image on x86_64 machines The echidna docker image does not support ARM Macs, for example. --- fuzzing/fuzz.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fuzzing/fuzz.sh b/fuzzing/fuzz.sh index 0aa5662..1d5dac8 100755 --- a/fuzzing/fuzz.sh +++ b/fuzzing/fuzz.sh @@ -2,6 +2,7 @@ set -e root=$(cd $(dirname "$0")/.. && pwd) +arch=$(arch) if command -v echidna; then fuzz () { @@ -11,7 +12,7 @@ if command -v echidna; then --crytic-args --ignore-compile \ --contract $1 } -else +elif [ "${arch}" = "x86_64" ]; then fuzz () { docker run \ --rm \ @@ -23,6 +24,10 @@ else --crytic-args --ignore-compile \ --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 fuzz FuzzMarketplace