Copy dictionaries over to help steer fuzzing. (#6414)

This commit is contained in:
Thomas Van Lenten 2021-09-07 16:17:12 -04:00 committed by GitHub
parent 05b51ab5b3
commit e39ef9c636
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -17,15 +17,25 @@
. precompile_swift
# build project
cd FuzzTesting
# debug build
swift build -c debug $SWIFTFLAGS
(
cd .build/debug/
find . -maxdepth 1 -type f -name "Fuzz*" -executable | while read i; do cp $i $OUT/"$i"_debug; done
)
# release build
swift build -c release $SWIFTFLAGS
(
cd .build/release/
find . -maxdepth 1 -type f -name "Fuzz*" -executable | while read i; do cp $i $OUT/"$i"_release; done
)
# Copy any dictionaries over.
for fuzz_dict in Fuzz*.dict ; do
fuzzer_name=$(basename $fuzz_dict .dict)
cp $fuzz_dict $OUT/${fuzzer_name}_debug.dict
cp $fuzz_dict $OUT/${fuzzer_name}_release.dict
done