mirror of
https://github.com/project-zot/zot.git
synced 2024-12-16 21:56:37 -05:00
20391a21c0
- Avoid hard-coding the path for bash - this typically is installed as /usr/local/bin/bash - Allow for the fact that FreeBSD's rlimit uses signed integers Almost all of the test suite passes with three test failures that I haven't tried to debug yet. Signed-off-by: Doug Rabson <dfr@rabson.org>
18 lines
483 B
Bash
18 lines
483 B
Bash
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
fuzzTime=${1:-10}
|
|
|
|
files=$(grep -r --include='**_test.go' --files-with-matches 'func Fuzz' .)
|
|
|
|
for file in ${files}
|
|
do
|
|
funcs=$(grep -oP 'func \K(Fuzz\w*)' $file)
|
|
for func in ${funcs}
|
|
do
|
|
echo "Fuzzing $func in $file"
|
|
parentDir=$(dirname $file)
|
|
go test $parentDir -run=$func -fuzz=$func$ -fuzztime=${fuzzTime}s -tags sync,metrics,search,scrub,containers_image_openpgp | grep -oP -x '^(?:(?!\blevel\b).)*$'
|
|
done
|
|
done
|