12345678910111213141516171819202122232425262728293031323334353637 |
- set -euo pipefail
- python3 -m pip install .
- SEED_DATA_DIR="$SRC/seed_data"
- find "$SEED_DATA_DIR" \( -name '*_seed_corpus.zip' -o -name '*.options' -o -name '*.dict' \) \
- ! \( -name '__base.*' \) -exec printf 'Copying: %s\n' {} \; \
- -exec chmod a-x {} \; \
- -exec cp {} "$OUT" \;
- find "$SRC/dulwich/fuzzing" -name 'fuzz_*.py' -print0 | while IFS= read -r -d '' fuzz_harness; do
- compile_python_fuzzer "$fuzz_harness"
- common_base_dictionary_filename="$SEED_DATA_DIR/__base.dict"
- if [[ -r "$common_base_dictionary_filename" ]]; then
-
- fuzz_harness_dictionary_filename="$(basename "$fuzz_harness" .py).dict"
- output_file="$OUT/$fuzz_harness_dictionary_filename"
- printf 'Appending %s to %s\n' "$common_base_dictionary_filename" "$output_file"
- if [[ -s "$output_file" ]]; then
-
-
-
-
-
-
- echo >>"$output_file"
- fi
- cat "$common_base_dictionary_filename" >>"$output_file"
- fi
- done
|