| 1 | #!/bin/sh |
| 2 | # |
| 3 | # Build and test Git's fuzzers |
| 4 | # |
| 5 | |
| 6 | . ${0%/*}/lib.sh |
| 7 | |
| 8 | group "Build fuzzers" make \ |
| 9 | NO_CURL=NoThanks \ |
| 10 | CC=clang \ |
| 11 | FUZZ_CXX=clang++ \ |
| 12 | CFLAGS="-fsanitize=fuzzer-no-link,address" \ |
| 13 | LIB_FUZZING_ENGINE="-fsanitize=fuzzer,address" \ |
| 14 | fuzz-all |
| 15 | |
| 16 | fuzzers=" |
| 17 | commit-graph |
| 18 | config |
| 19 | credential-from-url-gently |
| 20 | date |
| 21 | pack-headers |
| 22 | pack-idx |
| 23 | parse-attr-line |
| 24 | url-decode-mem |
| 25 | " |
| 26 | |
| 27 | for fuzzer in $fuzzers; do |
| 28 | begin_group "fuzz-$fuzzer" |
| 29 | ./oss-fuzz/fuzz-$fuzzer -verbosity=0 -runs=1 || exit 1 |
| 30 | end_group "fuzz-$fuzzer" |
| 31 | done |