1#!/bin/sh 2set -e 3 4LOCAL_DIR=`dirname $0` 5BTSTACK_ROOT=`realpath $LOCAL_DIR/../..` 6 7# build image if it doesn't exist 8if [[ "$(docker images -q fuzz 2> /dev/null)" == "" ]]; then 9 echo "Image for libfuzz does not exist, creating it now..." 10 docker image build --no-cache -t fuzz . 11fi 12 13# enter fuzz container and bring repo along 14docker run --rm -ti -v $BTSTACK_ROOT:/btstack -w /btstack/test/fuzz fuzz 15 16