zotregistry.io/zot@v1.4.4-0.20231124084042-02a8ed785457/test/scripts/fuzzAll.sh (about) 1 #!/usr/bin/env bash 2 3 set -e 4 5 fuzzTime=${1:-10} 6 7 files=$(grep -r --include='**_test.go' --files-with-matches 'func Fuzz' .) 8 9 for file in ${files} 10 do 11 funcs=$(grep -oP 'func \K(Fuzz\w*)' $file) 12 for func in ${funcs} 13 do 14 echo "Fuzzing $func in $file" 15 parentDir=$(dirname $file) 16 go test $parentDir -run=$func -fuzz=$func$ -fuzztime=${fuzzTime}s -tags sync,metrics,search,scrub,containers_image_openpgp | grep -oP -x '^(?:(?!\blevel\b).)*$' 17 done 18 done