11f805efeSMatthias Ringwald#!/bin/sh 2245302afSMatthias Ringwaldset -e 3245302afSMatthias Ringwald 4*852d5f72SMatthias RingwaldLOCAL_DIR=`dirname $0` 5*852d5f72SMatthias RingwaldBTSTACK_ROOT=`realpath $LOCAL_DIR/../..` 6245302afSMatthias Ringwald 7245302afSMatthias Ringwald# build image if it doesn't exist 8245302afSMatthias Ringwaldif [[ "$(docker images -q fuzz 2> /dev/null)" == "" ]]; then 9245302afSMatthias Ringwald echo "Image for libfuzz does not exist, creating it now..." 10245302afSMatthias Ringwald docker image build --no-cache -t fuzz . 11245302afSMatthias Ringwaldfi 12245302afSMatthias Ringwald 13245302afSMatthias Ringwald# enter fuzz container and bring repo along 141f805efeSMatthias Ringwalddocker run --rm -ti -v $BTSTACK_ROOT:/btstack -w /btstack/test/fuzz fuzz 151f805efeSMatthias Ringwald 16